summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2008-09-03 16:53:05 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2008-09-03 16:53:05 +0000
commit9eafb43c0ff761fa43425d329d281bb8fbece80e (patch)
treee016611c5b30c6ec921e43b46a371b0a5def2956 /lib/sqlalchemy/sql
parent920281ab55b407c9674759fa885797e1a9fff908 (diff)
downloadsqlalchemy-9eafb43c0ff761fa43425d329d281bb8fbece80e.tar.gz
- limit/offset no longer uses ROW NUMBER OVER to limit rows,
and instead uses subqueries in conjunction with a special Oracle optimization comment. Allows LIMIT/OFFSET to work in conjunction with DISTINCT. [ticket:536]
Diffstat (limited to 'lib/sqlalchemy/sql')
-rw-r--r--lib/sqlalchemy/sql/compiler.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py
index eacbe59e1..2982a1759 100644
--- a/lib/sqlalchemy/sql/compiler.py
+++ b/lib/sqlalchemy/sql/compiler.py
@@ -477,7 +477,8 @@ class DefaultCompiler(engine.Compiled):
if asfrom or (prev_entry and 'select' in prev_entry):
stack_entry['is_subquery'] = True
- if prev_entry and 'iswrapper' in prev_entry:
+ stack_entry['iswrapper'] = iswrapper
+ if not iswrapper and prev_entry and 'iswrapper' in prev_entry:
column_clause_args = {'result_map':self.result_map}
else:
column_clause_args = {}