From: Matt S Trout Date: Mon, 17 Sep 2018 00:03:36 +0000 (+0000) Subject: further and/or conversion X-Git-Tag: v1.90_01~453 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2143604f3a325bef51a756a98695ac6c0cbf3ea6;p=dbsrgits%2FSQL-Abstract.git further and/or conversion --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index c75bd6f..b0b1af2 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -578,7 +578,7 @@ sub _expand_expr { die "notreached"; } } - return { '-'.$logic => \@res }; + return { -op => [ $logic, @res ] }; } if (my $literal = is_literal_value($expr)) { return +{ -literal => $literal }; @@ -1278,7 +1278,7 @@ sub _where_op_OP { return $self->${\($us->{handler})}($k, $op, $args[1]); } my $final_op = $op =~ /^(?:is|not)_/ ? join(' ', split '_', $op) : $op; - if (@args == 1) { + if (@args == 1 and $op !~ /^(and|or)$/) { my ($expr_sql, @bind) = $self->_recurse_where($args[0]); my $op_sql = $self->_sqlcase($final_op); my $final_sql = (