summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/functions.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-01-25 21:04:50 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2010-01-25 21:04:50 +0000
commit73bfc876692afad7c9f3fcb8bc42bbe732738a5c (patch)
tree2afc36e3d6780c728eb847e83502848be63f9734 /lib/sqlalchemy/sql/functions.py
parentba53c6e844a81d984b70c46d2c1d41405e76595c (diff)
downloadsqlalchemy-73bfc876692afad7c9f3fcb8bc42bbe732738a5c.tar.gz
- Added a tuple_() construct, allows sets of expressions
to be compared to another set, typically with IN against composite primary keys or similar. Also accepts an IN with multiple columns. The "scalar select can have only one column" error message is removed - will rely upon the database to report problems with col mismatch.
Diffstat (limited to 'lib/sqlalchemy/sql/functions.py')
-rw-r--r--lib/sqlalchemy/sql/functions.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/sqlalchemy/sql/functions.py b/lib/sqlalchemy/sql/functions.py
index c6cb938d4..212f81ada 100644
--- a/lib/sqlalchemy/sql/functions.py
+++ b/lib/sqlalchemy/sql/functions.py
@@ -1,6 +1,6 @@
from sqlalchemy import types as sqltypes
from sqlalchemy.sql.expression import (
- ClauseList, Function, _literal_as_binds, text
+ ClauseList, Function, _literal_as_binds, text, _type_from_args
)
from sqlalchemy.sql import operators
from sqlalchemy.sql.visitors import VisitableType
@@ -102,9 +102,3 @@ class sysdate(AnsiFunction):
class user(AnsiFunction):
__return_type__ = sqltypes.String
-def _type_from_args(args):
- for a in args:
- if not isinstance(a.type, sqltypes.NullType):
- return a.type
- else:
- return sqltypes.NullType