From: Matt S Trout Date: Sat, 8 Sep 2018 00:02:47 +0000 (+0000) Subject: expand hashpair w/hash RHS X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e28d9b13439f40d98ed697a1dc8238de163a93ec;p=scpubgit%2FQ-Branch.git expand hashpair w/hash RHS --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 31e23bf..aa93bde 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -622,6 +622,12 @@ sub _expand_expr_hashpair { ] }; } + if (ref($v) eq 'HASH' and keys %$v > 1) { + return { -and => [ + map $self->_expand_expr_hashpair($k => { $_ => $v->{$_} }), + sort keys %$v + ] }; + } if (ref($v) eq 'ARRAY') { return $self->{sqlfalse} unless @$v; $self->_debug("ARRAY($k) means distribute over elements");