From: Wes Malone Date: Tue, 30 Nov 2010 03:41:49 +0000 (-0600) Subject: Removed excess parentheses in generated SQL X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c01ac648e75bbbfc6d6876e90dfe3754a6008327;p=scpubgit%2FQ-Branch.git Removed excess parentheses in generated SQL --- diff --git a/Changes b/Changes index 40979dc..ff220c6 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,6 @@ Revision history for SQL::Abstract + - Remove excess parentheses in debug SQL - Fix parsing of foo.* in SQLA::Tree - Fix bindtype fail when using -between with arrayrefref literals - Add handling for NULL for -in diff --git a/lib/SQL/Abstract/Tree.pm b/lib/SQL/Abstract/Tree.pm index 864451a..7b587c5 100644 --- a/lib/SQL/Abstract/Tree.pm +++ b/lib/SQL/Abstract/Tree.pm @@ -461,7 +461,6 @@ sub fill_in_placeholder { # FIXME - terrible name for a user facing API sub unparse { my ($self, $tree, $bindargs) = @_; - $self->_parenthesis_unroll($tree); $self->_unparse($tree, [@{$bindargs||[]}], 0); } @@ -472,6 +471,7 @@ sub _unparse { return ''; } + $self->_parenthesis_unroll($tree); my ($car, $cdr) = @{$tree}[0,1]; if (! defined $car or (! ref $car and ! defined $cdr) ) {