From: Peter Rabbitson Date: Thu, 12 Nov 2009 23:24:56 +0000 (+0000) Subject: Some cleanup X-Git-Tag: v0.08113~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4e791ec7b35170f9d9c1dc805d35a1eb4a792cbb;p=dbsrgits%2FDBIx-Class.git Some cleanup --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index ebea220..0de26f6 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -1549,20 +1549,20 @@ sub _dbh_execute_inserts_with_no_binds { } sub update { - my ($self, $source, $data, $where, @args) = @_; + my ($self, $source, @args) = @_; my $bind_attrs = $self->source_bind_attributes($source); - return $self->_execute('update' => [], $source, $bind_attrs, $data, $where, @args); + return $self->_execute('update' => [], $source, $bind_attrs, @args); } sub delete { - my ($self, $source, $where, @args) = @_; + my ($self, $source, @args) = @_; my $bind_attrs = $self->source_bind_attributes($source); - return $self->_execute('delete' => [], $source, $bind_attrs, $where, @args); + return $self->_execute('delete' => [], $source, $bind_attrs, @args); } # Most databases do not allow aliasing of tables in UPDATE/DELETE. Thus @@ -1634,16 +1634,7 @@ sub _subq_update_delete { my $rsrc = $rs->result_source; - # we already check this, but double check naively just in case. Should be removed soon - my $sel = $rs->_resolved_attrs->{select}; - $sel = [ $sel ] unless ref $sel eq 'ARRAY'; my @pcols = $rsrc->primary_columns; - if (@$sel != @pcols) { - $self->throw_exception ( - 'Subquery update/delete can not be called on resultsets selecting a' - .' number of columns different than the number of primary keys' - ); - } if (@pcols == 1) { return $self->$op (