summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2005-10-23 00:10:50 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2005-10-23 00:10:50 +0000
commit0a9e20ad12059982da6524de2d0a1ca0c170739d (patch)
tree11d6469068958d668d45adbe8cc488556ffc0228 /lib/sqlalchemy/sql.py
parent21093b37abec98d6add61c5f7801a400490bed2f (diff)
downloadsqlalchemy-0a9e20ad12059982da6524de2d0a1ca0c170739d.tar.gz
objectstore unit tests run with postgres/sqlite
Diffstat (limited to 'lib/sqlalchemy/sql.py')
-rw-r--r--lib/sqlalchemy/sql.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py
index bcb02efa4..4ac3467b2 100644
--- a/lib/sqlalchemy/sql.py
+++ b/lib/sqlalchemy/sql.py
@@ -283,7 +283,11 @@ class CompareMixin(object):
return self._compare('LIKE', other)
def in_(self, *other):
- if _is_literal(other[0]):
+ if len(other) == 0:
+ return self.__eq__(None)
+ elif len(other) == 1:
+ return self.__eq__(other[0])
+ elif _is_literal(other[0]):
return self._compare('IN', CompoundClause(',', other))
else:
return self._compare('IN', union(*other))