From: Matt S Trout Date: Thu, 21 Mar 2019 04:55:03 +0000 (+0000) Subject: expand andor for more cases X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=86997346cccf41bc8785bfc92086cdab0f7f7a16;p=scpubgit%2FQ-Branch.git expand andor for more cases --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 98c95f0..0d5586e 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;