X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FODBC%2FDB2_400_SQL.pm;h=33a4e7abb65a225e6e837e0017922739bf1421fb;hb=ef131d82b1a6cad5ef079a341912b0c6d8b7b990;hp=d4e6218c85230c1572a9f139063e467b05f797d2;hpb=f1f56aad66c46b1f6bb7a4424cdfd95529b82003;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/ODBC/DB2_400_SQL.pm b/lib/DBIx/Class/Storage/DBI/ODBC/DB2_400_SQL.pm index d4e6218..33a4e7a 100644 --- a/lib/DBIx/Class/Storage/DBI/ODBC/DB2_400_SQL.pm +++ b/lib/DBIx/Class/Storage/DBI/ODBC/DB2_400_SQL.pm @@ -3,12 +3,10 @@ use strict; use warnings; use base qw/DBIx::Class::Storage::DBI::ODBC/; +use mro 'c3'; -sub last_insert_id -{ - my ($self) = @_; - - my $dbh = $self->_dbh; +sub _dbh_last_insert_id { + my ($self, $dbh, $source, $col) = @_; # get the schema/table separator: # '.' when SQL naming is active @@ -23,13 +21,17 @@ sub last_insert_id return @res ? $res[0] : undef; } -sub _sql_maker_args { +sub _sql_maker_opts { my ($self) = @_; - return ( - limit_dialect => 'FetchFirst', - name_sep => $self->_dbh->get_info(41) - ); + $self->dbh_do(sub { + my ($self, $dbh) = @_; + + return { + limit_dialect => 'FetchFirst', + name_sep => $dbh->get_info(41) + }; + }); } 1; @@ -50,12 +52,12 @@ over ODBC This class implements support specific to DB2/400 over ODBC, including auto-increment primary keys, SQL::Abstract::Limit dialect, and name separator -for for connections using either SQL naming or System naming. +for connections using either SQL naming or System naming. =head1 AUTHORS -Marc Mims C<< >> +Marc Mims C<< >> Based on DBIx::Class::Storage::DBI::DB2 by Jess Robinson.