summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/expression.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-08-03 14:06:41 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2010-08-03 14:06:41 -0400
commit96837098cdafb0b53d0bd8c480da93330d2c1806 (patch)
tree9c2bbcd25c3df1c278cbfa302477dbc442272440 /lib/sqlalchemy/sql/expression.py
parent54feab41f9fc81966da1f6e7bc35344c8ba5f604 (diff)
downloadsqlalchemy-96837098cdafb0b53d0bd8c480da93330d2c1806.tar.gz
- the text() construct, if placed in a column
oriented situation, will at least return NULLTYPE for its type instead of None, allowing it to be used a little more freely for ad-hoc column expressions than before. literal_column() is still the better choice, however.
Diffstat (limited to 'lib/sqlalchemy/sql/expression.py')
-rw-r--r--lib/sqlalchemy/sql/expression.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py
index 8a92dba0d..4b8df74c6 100644
--- a/lib/sqlalchemy/sql/expression.py
+++ b/lib/sqlalchemy/sql/expression.py
@@ -428,8 +428,8 @@ def case(whens, value=None, else_=None):
The expressions used for THEN and ELSE,
when specified as strings, will be interpreted
as bound values. To specify textual SQL expressions
- for these, use the literal_column(<string>) or
- text(<string>) construct.
+ for these, use the :func:`literal_column`
+ construct.
The expressions used for the WHEN criterion
may only be literal strings when "value" is
@@ -2436,7 +2436,7 @@ class _TextClause(Executable, ClauseElement):
if self.typemap is not None and len(self.typemap) == 1:
return list(self.typemap)[0]
else:
- return None
+ return sqltypes.NULLTYPE
def self_group(self, against=None):
if against is operators.in_op: