From: Matt S Trout Date: Thu, 18 Apr 2019 02:15:17 +0000 (+0000) Subject: cleanup andor X-Git-Tag: v2.000000~3^2~202 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=55f54da0eb1ae2f12ea056e72fe10d6ef740ea95;p=dbsrgits%2FSQL-Abstract.git cleanup andor --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 13bfd6b..0100055 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -1171,8 +1171,11 @@ sub _render_op_andor { my @parts = map [ $self->render_aqt($_) ], @$args; return '' unless @parts; return @{$parts[0]} if @parts == 1; - my ($sql, @bind) = $self->join_query_parts(' '.$self->_sqlcase($op).' ', @parts); - return '( '.$sql.' )', @bind; + my ($sql, @bind) = $self->join_query_parts(' ', + '(', [ $self->join_query_parts( + ' '.$self->format_keyword($op).' ', + @parts) ], + ')'); } sub _render_op_multop {