From: Matt S Trout Date: Mon, 17 Sep 2018 01:46:00 +0000 (+0000) Subject: switch update to using _render_expr X-Git-Tag: v2.000000~3^2~463 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ee731876b8ac70a8ba04d410ada6a3c5a2c5e760;p=dbsrgits%2FSQL-Abstract.git switch update to using _render_expr --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index c2ff3d7..dc21ce0 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -433,8 +433,10 @@ sub _update_set_values { puke 'Operator calls in update must be in the form { -op => $arg }' if (@rest or not $op =~ /^\-(.+)/); - local $self->{_nested_func_lhs} = $k; - my ($sql, @bind) = $self->_where_unary_op($1, $arg); + local our $Cur_Col_Meta = $k; + my ($sql, @bind) = $self->_render_expr( + $self->_expand_expr_hashpair($op, $arg) + ); push @set, "$label = $sql"; push @all_bind, @bind;