1 package DBIx::Class::Storage::DBI::ODBC400;
5 use base qw/DBIx::Class::Storage::DBI/;
11 my $dbh = $self->_dbh;
13 # get the schema/table separator:
14 # '.' when SQL naming is active
15 # '/' when sytem naming is active
16 my $sep = $dbh->get_info(41);
17 my $sth = $dbh->prepare_cached(
18 "SELECT IDENTITY_VAL_LOCAL() FROM SYSIBM${sep}SYSDUMMY1", {}, 3);
21 my @res = $sth->fetchrow_array();
23 return @res ? $res[0] : undef;
30 DBIx::Class::Storage::DBI::ODBC400 - Automatic primary key class for DB2/400
35 # In your table classes
36 __PACKAGE__->load_components(qw/PK::Auto Core/);
37 __PACKAGE__->set_primary_key('id');
42 This class implements autoincrements for DB2/400 over ODBC.
47 Marc Mims C<< <marc@questright.com> >>
51 You may distribute this code under the same terms as Perl itself.