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