From: Matt S Trout Date: Fri, 19 Apr 2019 05:07:55 +0000 (+0000) Subject: move render statement to parts based X-Git-Tag: v1.90_01~166 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=531d5231ebea04354319b7129098ed18253e6b6c;p=dbsrgits%2FSQL-Abstract.git move render statement to parts based --- diff --git a/lib/SQL/Abstract/Clauses.pm b/lib/SQL/Abstract/Clauses.pm index f60ddad..25462b4 100644 --- a/lib/SQL/Abstract/Clauses.pm +++ b/lib/SQL/Abstract/Clauses.pm @@ -160,11 +160,10 @@ sub _render_statement { }; push @parts, $part; } - my ($sql, @bind) = @{ $self->join_query_parts(' ', @parts) }; - return [ - (our $Render_Top_Level ? $sql : '('.$sql.')'), - @bind - ]; + my $q = $self->join_query_parts(' ', @parts); + return $self->join_query_parts('', + (our $Render_Top_Level ? $q : ('(', $q, ')')) + ); } sub render_aqt {