X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI.pm;h=32c6ed1f34e2b5ad988657da7201a6c3845e2947;hb=243d702ea2d1350e9c08d52eb84cdde745913452;hp=ccd1cf2c813d1f74ad0b6f40b14d0780dc82ca73;hpb=f200d74bc27c2143237595dde6b6913098045114;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index ccd1cf2..32c6ed1 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -1833,7 +1833,7 @@ sub _select_args { && (ref $ident eq 'ARRAY' && @$ident > 1) # indicates a join && - scalar $sql_maker->_order_by_chunks ($attrs->{order_by}) + scalar $self->_parse_order_by ($attrs->{order_by}) ) { # the RNO limit dialect above mangles the SQL such that the join gets lost # wrap a subquery here @@ -2053,18 +2053,14 @@ Return the row id of the last insert. =cut sub _dbh_last_insert_id { - # All Storage's need to register their own _dbh_last_insert_id - # the old SQLite-based method was highly inappropriate + my ($self, $dbh, $source, $col) = @_; - my $self = shift; - my $class = ref $self; - $self->throw_exception (<last_insert_id (undef, undef, $source->name, $col) }; -No _dbh_last_insert_id() method found in $class. -Since the method of obtaining the autoincrement id of the last insert -operation varies greatly between different databases, this method must be -individually implemented for every storage class. -EOE + return $id if defined $id; + + my $class = ref $self; + $self->throw_exception ("No storage specific _dbh_last_insert_id() method implemented in $class, and the generic DBI::last_insert_id() failed"); } sub last_insert_id {