summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2008-10-18 17:34:52 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2008-10-18 17:34:52 +0000
commit1127b10b278440247f18d1859e1f70a4aafaa9fb (patch)
treed1b149d4bf92b1a01235000490438bfd91391a0e /lib/sqlalchemy/databases
parent654794cdcf89eb7842ddf06bd9316bd860bca9e7 (diff)
downloadsqlalchemy-1127b10b278440247f18d1859e1f70a4aafaa9fb.tar.gz
- "not equals" comparisons of simple many-to-one relation
to an instance will not drop into an EXISTS clause and will compare foreign key columns instead. - removed not-really-working use cases of comparing a collection to an iterable. Use contains() to test for collection membership. - Further simplified SELECT compilation and its relationship to result row processing. - Direct execution of a union() construct will properly set up result-row processing. [ticket:1194]
Diffstat (limited to 'lib/sqlalchemy/databases')
-rw-r--r--lib/sqlalchemy/databases/maxdb.py6
-rw-r--r--lib/sqlalchemy/databases/mssql.py2
-rw-r--r--lib/sqlalchemy/databases/sybase.py2
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/sqlalchemy/databases/maxdb.py b/lib/sqlalchemy/databases/maxdb.py
index 34629b298..0e7310ab6 100644
--- a/lib/sqlalchemy/databases/maxdb.py
+++ b/lib/sqlalchemy/databases/maxdb.py
@@ -829,7 +829,7 @@ class MaxDBCompiler(compiler.DefaultCompiler):
# No ORDER BY in subqueries.
if order_by:
- if self.is_subquery(select):
+ if self.is_subquery():
# It's safe to simply drop the ORDER BY if there is no
# LIMIT. Right? Other dialects seem to get away with
# dropping order.
@@ -845,7 +845,7 @@ class MaxDBCompiler(compiler.DefaultCompiler):
def get_select_precolumns(self, select):
# Convert a subquery's LIMIT to TOP
sql = select._distinct and 'DISTINCT ' or ''
- if self.is_subquery(select) and select._limit:
+ if self.is_subquery() and select._limit:
if select._offset:
raise exc.InvalidRequestError(
'MaxDB does not support LIMIT with an offset.')
@@ -855,7 +855,7 @@ class MaxDBCompiler(compiler.DefaultCompiler):
def limit_clause(self, select):
# The docs say offsets are supported with LIMIT. But they're not.
# TODO: maybe emulate by adding a ROWNO/ROWNUM predicate?
- if self.is_subquery(select):
+ if self.is_subquery():
# sub queries need TOP
return ''
elif select._offset:
diff --git a/lib/sqlalchemy/databases/mssql.py b/lib/sqlalchemy/databases/mssql.py
index 4c5ad1fd1..42743870a 100644
--- a/lib/sqlalchemy/databases/mssql.py
+++ b/lib/sqlalchemy/databases/mssql.py
@@ -994,7 +994,7 @@ class MSSQLCompiler(compiler.DefaultCompiler):
order_by = self.process(select._order_by_clause)
# MSSQL only allows ORDER BY in subqueries if there is a LIMIT
- if order_by and (not self.is_subquery(select) or select._limit):
+ if order_by and (not self.is_subquery() or select._limit):
return " ORDER BY " + order_by
else:
return ""
diff --git a/lib/sqlalchemy/databases/sybase.py b/lib/sqlalchemy/databases/sybase.py
index 5c64ec1ae..b464a3bcb 100644
--- a/lib/sqlalchemy/databases/sybase.py
+++ b/lib/sqlalchemy/databases/sybase.py
@@ -798,7 +798,7 @@ class SybaseSQLCompiler(compiler.DefaultCompiler):
order_by = self.process(select._order_by_clause)
# SybaseSQL only allows ORDER BY in subqueries if there is a LIMIT
- if order_by and (not self.is_subquery(select) or select._limit):
+ if order_by and (not self.is_subquery() or select._limit):
return " ORDER BY " + order_by
else:
return ""