diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-03-06 01:17:12 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-03-06 01:17:12 +0000 |
commit | 51acad4b5bf4ec5517d66e111d625ac0a0fd443e (patch) | |
tree | 655885efb9468010cedc58ea380ffb8184355f15 /lib/sqlalchemy/sql.py | |
parent | e59ad037b0053b66b9c3a6c84449012f3219594a (diff) | |
download | sqlalchemy-51acad4b5bf4ec5517d66e111d625ac0a0fd443e.tar.gz |
more tweak to compoundselect parenthesizing/subquery flag
Diffstat (limited to 'lib/sqlalchemy/sql.py')
-rw-r--r-- | lib/sqlalchemy/sql.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py index 5389f4bd7..d4d059d6a 100644 --- a/lib/sqlalchemy/sql.py +++ b/lib/sqlalchemy/sql.py @@ -1208,11 +1208,8 @@ class Select(SelectBaseMixin, FromClause): self.is_where = is_where def visit_compound_select(self, cs): self.visit_select(cs) - # unselect the 'issubquery' flag on the selects within the compound, - # i.e. "SELECT foo UNION SELECT bar", since the enclosing compound select - # is the "subquery" for s in cs.selects: - s.issubquery = False + s.useparens = False def visit_column(self, c):pass def visit_table(self, c):pass def visit_select(self, select): @@ -1220,6 +1217,7 @@ class Select(SelectBaseMixin, FromClause): return select.is_where = self.is_where select.issubquery = True + select.useparens = True if getattr(select, '_correlated', None) is None: select._correlated = self.select._froms |