From: Matt S Trout Date: Thu, 18 Apr 2019 01:45:44 +0000 (+0000) Subject: move func rendering over to join_query_parts X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=778ee98b70b2a7ae44aa17c47ea609d7a2b7466c;p=scpubgit%2FQ-Branch.git move func rendering over to join_query_parts --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 2ef8f4e..b3aaa20 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -1082,16 +1082,12 @@ sub _render_row { sub _render_func { my ($self, undef, $rest) = @_; my ($func, @args) = @$rest; - if (ref($func) eq 'HASH') { - $func = $self->render_aqt($func); - } - my @arg_sql; - my @bind = map { - my @x = @$_; - push @arg_sql, shift @x; - @x - } map [ $self->render_aqt($_) ], @args; - return ($self->_sqlcase($func).'('.join(', ', @arg_sql).')', @bind); + return $self->join_query_parts('', + [ $self->_sqlcase($func) ], + [ '(' ], + [ $self->join_query_parts(', ', @args) ], + [ ')' ] + ); } sub _render_bind {