From: Matt S Trout Date: Tue, 4 Sep 2018 02:46:19 +0000 (+0000) Subject: negation expansion X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ce3bc4b0f271bfff9032c9279cc1b2688bbe67c5;p=scpubgit%2FQ-Branch.git negation expansion --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 3078d8e..9364128 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -556,6 +556,9 @@ sub _expand_expr_hashpair { if ($k eq '-nest') { return $self->_expand_expr($v); } + if (my ($rest) = $k =~/^-not[_ ](.*)$/) { + return $self->_expand_expr({ -not => { "-${rest}", $v } }, $logic); + } } else { if (!ref($v)) { return +{ $k => { $self->{cmp} => $v } };