]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- case() interprets the "THEN" expressions
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 3 Apr 2008 16:34:03 +0000 (16:34 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 3 Apr 2008 16:34:03 +0000 (16:34 +0000)
commitabb10856dcea07ca4d38d28df4e493d11d8fd345
tree3936f0a7a9ddf7560928b6e21c4fd4a8669c337a
parenta27d6be28a0beb35da2e3eb1dfed7ab7460d7654
- case() interprets the "THEN" expressions
as values by default, meaning case([(x==y, "foo")]) will
interpret "foo" as a bound value, not a SQL expression.
use text(expr) for literal SQL expressions in this case.
For the criterion itself, these may be literal strings
only if the "value" keyword is present, otherwise SA
will force explicit usage of either text() or literal().
CHANGES
lib/sqlalchemy/sql/expression.py
test/sql/case_statement.py