[Bast-commits] r8526 -
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Wed Feb 3 16:36:40 GMT 2010
Author: caelum
Date: 2010-02-03 16:36:39 +0000 (Wed, 03 Feb 2010)
New Revision: 8526
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/SQLAnywhere.pm
Log:
minor code cleanup for SQL Anywhere last_insert_id
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/SQLAnywhere.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/SQLAnywhere.pm 2010-02-03 12:21:37 UTC (rev 8525)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/SQLAnywhere.pm 2010-02-03 16:36:39 UTC (rev 8526)
@@ -39,17 +39,11 @@
my $self = shift;
my ($source, $to_insert) = @_;
- my $supplied_col_info = $self->_resolve_column_info($source, [keys %$to_insert]);
-
- my $is_identity_insert = (List::Util::first { $_->{is_auto_increment} } (values %$supplied_col_info) )
- ? 1
- : 0;
-
my $identity_col = List::Util::first {
$source->column_info($_)->{is_auto_increment}
} $source->columns;
- if ((not $is_identity_insert) && $identity_col) {
+ if ($identity_col && (not exists $to_insert->{$identity_col})) {
my $dbh = $self->_get_dbh;
my $table_name = $source->from;
$table_name = $$table_name if ref $table_name;
More information about the Bast-commits
mailing list