1 package DBIx::Class::Storage::DBI::ODBC::DB2_400_SQL;
5 use base qw/DBIx::Class::Storage::DBI::ODBC/;
14 # get the schema/table separator:
15 # '.' when SQL naming is active
16 # '/' when system naming is active
17 my $sep = $dbh->get_info(41);
18 my $sth = $dbh->prepare_cached(
19 "SELECT IDENTITY_VAL_LOCAL() FROM SYSIBM${sep}SYSDUMMY1", {}, 3);
22 my @res = $sth->fetchrow_array();
24 return @res ? $res[0] : undef;
32 { limit_dialect => 'FetchFirst', name_sep => shift->get_info(41) }
40 DBIx::Class::Storage::DBI::ODBC::DB2_400_SQL - Support specific to DB2/400
45 # In your table classes
46 __PACKAGE__->load_components(qw/PK::Auto Core/);
47 __PACKAGE__->set_primary_key('id');
52 This class implements support specific to DB2/400 over ODBC, including
53 auto-increment primary keys, SQL::Abstract::Limit dialect, and name separator
54 for connections using either SQL naming or System naming.
59 Marc Mims C<< <marc@sssonline.com> >>
61 Based on DBIx::Class::Storage::DBI::DB2 by Jess Robinson.
65 You may distribute this code under the same terms as Perl itself.