[Bast-commits] r7426 -
DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Sat Aug 29 11:40:49 GMT 2009
Author: ribasushi
Date: 2009-08-29 11:40:48 +0000 (Sat, 29 Aug 2009)
New Revision: 7426
Modified:
DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm
Log:
Varname was absolutely correct
Modified: DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm
===================================================================
--- DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm 2009-08-29 11:36:22 UTC (rev 7425)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm 2009-08-29 11:40:48 UTC (rev 7426)
@@ -328,7 +328,7 @@
sub update {
my $self = shift;
- my ($source, $fields, $ident_cond) = @_;
+ my ($source, $fields, $where) = @_;
my $wantarray = wantarray;
@@ -345,7 +345,7 @@
$self->next::method(@_);
}
- $self->_update_blobs($source, $blob_cols, $ident_cond) if %$blob_cols;
+ $self->_update_blobs($source, $blob_cols, $where) if %$blob_cols;
return $wantarray ? @res : $res[0];
}
@@ -366,7 +366,7 @@
}
sub _update_blobs {
- my ($self, $source, $blob_cols, $ident_cond) = @_;
+ my ($self, $source, $blob_cols, $where) = @_;
my (@primary_cols) = $source->primary_columns;
@@ -376,17 +376,17 @@
# check if we're updating a single row by PK
my $pk_cols_in_where = 0;
for my $col (@primary_cols) {
- $pk_cols_in_where++ if defined $ident_cond->{$col};
+ $pk_cols_in_where++ if defined $where->{$col};
}
my @rows;
if ($pk_cols_in_where == @primary_cols) {
my %row_to_update;
- @row_to_update{@primary_cols} = @{$ident_cond}{@primary_cols};
+ @row_to_update{@primary_cols} = @{$where}{@primary_cols};
@rows = \%row_to_update;
} else {
my $rs = $source->resultset->search(
- $ident_cond,
+ $where,
{
result_class => 'DBIx::Class::ResultClass::HashRefInflator',
select => \@primary_cols
More information about the Bast-commits
mailing list