X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FInterBase.pm;h=e14277a0d314b284ba1b5df3211f8e6fef60454d;hb=f3e9f0106fd3a446938e1a981704278922fcab2d;hp=4af0dddaffc8653349dea3f37995c7ce8ac64085;hpb=fd323bf1046faa7de5a8c985268d80ec5b703361;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/InterBase.pm b/lib/DBIx/Class/Storage/DBI/InterBase.pm index 4af0ddd..e14277a 100644 --- a/lib/DBIx/Class/Storage/DBI/InterBase.pm +++ b/lib/DBIx/Class/Storage/DBI/InterBase.pm @@ -4,7 +4,7 @@ use strict; use warnings; use base qw/DBIx::Class::Storage::DBI/; use mro 'c3'; -use List::Util(); +use List::Util 'first'; use Try::Tiny; use namespace::clean; @@ -15,8 +15,8 @@ DBIx::Class::Storage::DBI::InterBase - Driver for the Firebird RDBMS =head1 DESCRIPTION This class implements autoincrements for Firebird using C as well as -L sets the limit dialect to -C and provides L support. +L and provides +L support. You need to use either the L option or @@ -31,7 +31,9 @@ L. =cut -sub _supports_insert_returning { 1 } +# set default +__PACKAGE__->_use_insert_returning (1); +__PACKAGE__->sql_limit_dialect ('FirstSkip'); sub _sequence_fetch { my ($self, $nextval, $sequence) = @_; @@ -80,7 +82,7 @@ EOF $generator = uc $generator unless $quoted; return $generator - if List::Util::first { + if first { $self->sql_maker->quote_char ? ($_ eq $col) : (uc($_) eq uc($col)) } @trig_cols; } @@ -89,18 +91,6 @@ EOF return undef; } -# this sub stolen from DB2 - -sub _sql_maker_opts { - my ( $self, $opts ) = @_; - - if ( $opts ) { - $self->{_sql_maker_opts} = { %$opts }; - } - - return { limit_dialect => 'FirstSkip', %{$self->{_sql_maker_opts}||{}} }; -} - sub _svp_begin { my ($self, $name) = @_;