From: Matt S Trout Date: Sun, 31 Jul 2011 19:56:41 +0000 (+0000) Subject: gut values using _mutation_rhs_to_dq code X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5cf3969eaa5d8b59a98d8eaf5c4983261a72b29b;p=dbsrgits%2FSQL-Abstract.git gut values using _mutation_rhs_to_dq code --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index e8f1aba..606ef6d 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -956,28 +956,11 @@ sub values { my @all_bind; foreach my $k ( sort keys %$data ) { my $v = $data->{$k}; - $self->_SWITCH_refkind($v, { - ARRAYREF => sub { - if ($self->{array_datatypes}) { # array datatype - push @all_bind, $self->_bindtype($k, $v); - } - else { # literal SQL with bind - my ($sql, @bind) = @$v; - $self->_assert_bindval_matches_bindtype(@bind); - push @all_bind, @bind; - } - }, - ARRAYREFREF => sub { # literal SQL with bind - my ($sql, @bind) = @${$v}; - $self->_assert_bindval_matches_bindtype(@bind); - push @all_bind, @bind; - }, - SCALARREF => sub { # literal SQL without bind - }, - SCALAR_or_UNDEF => sub { - push @all_bind, $self->_bindtype($k, $v); - }, - }); + local our $Cur_Col_Meta = $k; + my ($sql, @bind) = $self->_render_dq( + $self->_mutation_rhs_to_dq($v) + ); + push @all_bind, @bind; } return @all_bind;