1 package DBIx::Class::Storage::DBI::ODBC::DB2_400_SQL;
5 use base qw/DBIx::Class::Storage::DBI::ODBC/;
11 my $dbh = $self->_dbh;
13 # get the schema/table separator:
14 # '.' when SQL naming is active
15 # '/' when system 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 limit_dialect => 'FetchFirst',
31 name_sep => $self->_dbh->get_info(41)
39 DBIx::Class::Storage::DBI::ODBC::DB2_400_SQL - Support specific to DB2/400
44 # In your table classes
45 __PACKAGE__->load_components(qw/PK::Auto Core/);
46 __PACKAGE__->set_primary_key('id');
51 This class implements support specific to DB2/400 over ODBC, including
52 auto-increment primary keys, SQL::Abstract::Limit dialect, and name separator
53 for connections using either SQL naming or System naming.
58 Marc Mims C<< <marc@sssonline.com> >>
60 Based on DBIx::Class::Storage::DBI::DB2 by Jess Robinson.
64 You may distribute this code under the same terms as Perl itself.