X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FDB2.pm;h=3bad8e0e17a964e15a73fee16e999383565b4db1;hb=4225194590a09e29451ba825c34483f98c1a0c03;hp=4b5051b016e3ec2560ee007db5cec11255f62738;hpb=d4f16b21abb7a541e0c44bfe3ec68309a8d722fa;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/DB2.pm b/lib/DBIx/Class/Storage/DBI/DB2.pm index 4b5051b..3bad8e0 100644 --- a/lib/DBIx/Class/Storage/DBI/DB2.pm +++ b/lib/DBIx/Class/Storage/DBI/DB2.pm @@ -4,8 +4,7 @@ use strict; use warnings; use base qw/DBIx::Class::Storage::DBI/; - -# __PACKAGE__->load_components(qw/PK::Auto/); +use mro 'c3'; sub _dbh_last_insert_id { my ($self, $dbh, $source, $col) = @_; @@ -20,6 +19,16 @@ sub _dbh_last_insert_id { sub datetime_parser_type { "DateTime::Format::DB2"; } +sub _sql_maker_opts { + my ( $self, $opts ) = @_; + + if ( $opts ) { + $self->{_sql_maker_opts} = { %$opts }; + } + + return { limit_dialect => 'RowNumberOver', %{$self->{_sql_maker_opts}||{}} }; +} + 1; =head1 NAME @@ -29,7 +38,7 @@ DBIx::Class::Storage::DBI::DB2 - Automatic primary key class for DB2 =head1 SYNOPSIS # In your table classes - __PACKAGE__->load_components(qw/PK::Auto Core/); + use base 'DBIx::Class::Core'; __PACKAGE__->set_primary_key('id'); =head1 DESCRIPTION