From: Matt S Trout Date: Thu, 21 Mar 2019 04:55:03 +0000 (+0000) Subject: expand andor for more cases X-Git-Tag: v2.000000~3^2~373 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b0e2f67ab1e741817194da5610633b92a6a5e052;p=dbsrgits%2FSQL-Abstract.git expand andor for more cases --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index c8f4a7f..b7d31d6 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -670,11 +670,10 @@ sub _expand_expr_hashpair { } if (ref($v) eq 'HASH') { if (keys %$v > 1) { - return { -op => [ - 'and', - map $self->_expand_expr({ $k => { $_ => $v->{$_} } }), + return $self->_expand_andor(-and => [ + map +{ $k => { $_ => $v->{$_} } }, sort keys %$v - ] }; + ]); } return undef unless keys %$v; my ($vk, $vv) = %$v;