diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-02-05 17:04:37 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-02-05 17:04:37 +0000 |
commit | 1e1eea05538e43a41750ba8548da517d77284e9c (patch) | |
tree | d2998bf781b5f7f8e9b4c08767436265a7a4118f /lib/sqlalchemy/ansisql.py | |
parent | a9fb2f3e6f9b3dd50385cfea5570a023a89ddd8c (diff) | |
download | sqlalchemy-1e1eea05538e43a41750ba8548da517d77284e9c.tar.gz |
got oracle LIMIT/OFFSET to use row_number() syntax
sql: ColumnClause will use the given name when proxying itself (used for the "ora_rn" label)
ansisql: When adding on ORDER_BY, GROUP_BY, etc. clauses, if there is no string for the column list,
then dont add the clause (this allows oracle to strip out the ORDER BY)
Oracle is modifying the select statement, which is not ideal - should fix that
Diffstat (limited to 'lib/sqlalchemy/ansisql.py')
-rw-r--r-- | lib/sqlalchemy/ansisql.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/ansisql.py b/lib/sqlalchemy/ansisql.py index 30060a93c..fc4af5198 100644 --- a/lib/sqlalchemy/ansisql.py +++ b/lib/sqlalchemy/ansisql.py @@ -319,7 +319,9 @@ class ANSICompiler(sql.Compiled): text += " \nWHERE " + t for tup in select.clauses: - text += " " + tup[0] + " " + self.get_str(tup[1]) + ss = self.get_str(tup[1]) + if ss: + text += " " + tup[0] + " " + ss if select.having is not None: t = self.get_str(select.having) |