1 package DBIx::Class::Storage::DBI::ODBC;
5 use base qw/DBIx::Class::Storage::DBI/;
10 my $dbtype = eval { $self->dbh->get_info(17) };
12 # Translate the backend name into a perl identifier
14 my $subclass = "DBIx::Class::Storage::DBI::ODBC::${dbtype}";
15 if ($self->load_optional_class($subclass) && !$self->isa($subclass)) {
16 bless $self, $subclass;
22 sub _dbh_last_insert_id {
23 my ($self, $dbh, $source, $col) = @_;
25 # punt: if there is no derived class for the specific backend, attempt
26 # to use the DBI->last_insert_id, which may not be sufficient (see the
27 # discussion of last_insert_id in perldoc DBI)
28 return $dbh->last_insert_id(undef, undef, $source->from, $col);
35 DBIx::Class::Storage::DBI::ODBC - Base class for ODBC drivers
39 # In your table classes
40 __PACKAGE__->load_components(qw/Core/);
45 This class simply provides a mechanism for discovering and loading a sub-class
46 for a specific ODBC backend. It should be transparent to the user.
51 Marc Mims C<< <marc@questright.com> >>
55 You may distribute this code under the same terms as Perl itself.