diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-12-16 19:32:10 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-12-16 19:32:10 -0500 |
commit | 207aaf2f41cff5970b34999d3cfc845a3b0df29c (patch) | |
tree | ae5c7eb814efcb3a00b0d34e60295f9c045403c6 /lib/sqlalchemy/sql/compiler.py | |
parent | 84f1d3417978197c695850b3711ea4b7e2582be8 (diff) | |
download | sqlalchemy-207aaf2f41cff5970b34999d3cfc845a3b0df29c.tar.gz |
- for [ticket:2651], leaving CheckConstraint alone, preferring to keep
backwards compatibility. A note about backslashing escapes is added.
Because the Text() construct now supports bind params better, the example
given in the code raises an exception now, so that should cover us.
The exception itself has been enhanced to include the key name of the
bound param. We're backporting this to 0.8 but 0.8 doesn't have the
text->bind behavior that raises.
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 3c8d71331..1d38c9ad3 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -970,8 +970,9 @@ class SQLCompiler(Compiled): (within_columns_clause and \ self.ansi_bind_rules): if bindparam.value is None: - raise exc.CompileError("Bind parameter without a " - "renderable value not allowed here.") + raise exc.CompileError("Bind parameter '%s' without a " + "renderable value not allowed here." + % bindparam.key) return self.render_literal_bindparam(bindparam, within_columns_clause=True, **kwargs) |