From: Matt S Trout Date: Sun, 16 Sep 2018 22:49:17 +0000 (+0000) Subject: make non-unops multipart X-Git-Tag: v1.90_01~455 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=16d9289c0eb09a3fdb403ae3a96300b8caf4cf1b;p=dbsrgits%2FSQL-Abstract.git make non-unops multipart --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 71b4c53..4473764 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -1286,11 +1286,11 @@ sub _where_op_OP { : "${op_sql} ${expr_sql}" ); return (($op eq 'not' ? '('.$final_sql.')' : $final_sql), @bind); - } elsif (@args == 2) { - my ($l, $r) = map [ $self->_recurse_where($_) ], @args; + } else { + my @parts = map [ $self->_recurse_where($_) ], @args; return ( - $l->[0].' '.$self->_sqlcase($final_op).' '.$r->[0], - @{$l}[1..$#$l], @{$r}[1..$#$r] + join(' '.$self->_sqlcase($final_op).' ', map $_->[0], @parts), + map @{$_}[1..$#$_], @parts ); } die "unhandled";