X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FDB2.pm;h=4b5051b016e3ec2560ee007db5cec11255f62738;hb=434ffe5f4cd4d2bfb6cadb6c6100096ecdadbb60;hp=a6e145291c0ec35bdcc8bc2f2df04c9250820f8e;hpb=843f8ecda2d9885b79402416f048016c1ecc4114;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/DB2.pm b/lib/DBIx/Class/Storage/DBI/DB2.pm index a6e1452..4b5051b 100644 --- a/lib/DBIx/Class/Storage/DBI/DB2.pm +++ b/lib/DBIx/Class/Storage/DBI/DB2.pm @@ -7,23 +7,22 @@ use base qw/DBIx::Class::Storage::DBI/; # __PACKAGE__->load_components(qw/PK::Auto/); -sub last_insert_id -{ - my ($self) = @_; +sub _dbh_last_insert_id { + my ($self, $dbh, $source, $col) = @_; - my $dbh = $self->_dbh; - my $sth = $dbh->prepare_cached("VALUES(IDENTITY_VAL_LOCAL())", {}, 3); + my $sth = $dbh->prepare_cached('VALUES(IDENTITY_VAL_LOCAL())', {}, 3); $sth->execute(); my @res = $sth->fetchrow_array(); return @res ? $res[0] : undef; - } +sub datetime_parser_type { "DateTime::Format::DB2"; } + 1; -=head1 NAME +=head1 NAME DBIx::Class::Storage::DBI::DB2 - Automatic primary key class for DB2