projects
/
dbsrgits/Data-Query.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
ce86e12
)
don't deparenthesise subqueries with a group by
Matt S Trout [Thu, 23 Aug 2012 18:27:39 +0000 (18:27 +0000)]
lib/Data/Query/Renderer/SQL/Naive.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Data/Query/Renderer/SQL/Naive.pm
b/lib/Data/Query/Renderer/SQL/Naive.pm
index
c9d356c
..
96abe9c
100644
(file)
--- a/
lib/Data/Query/Renderer/SQL/Naive.pm
+++ b/
lib/Data/Query/Renderer/SQL/Naive.pm
@@
-144,7
+144,7
@@
sub _render_operator {
sub _maybe_parenthesise {
my ($self, $dq) = @_;
for ($dq) {
- return is_Select() || is_Slice()
+ return is_Select() || is_Group() || is_Slice()
? [ '(', $self->_render($dq), ')' ]
: $self->_render($dq);
}