summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-12-16 19:32:10 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2013-12-16 19:34:48 -0500
commit0fefc6e22641287100eb0648cf1264daeefeb020 (patch)
treee6dd4699a625e68f57f1477a43069c2382c9cf12 /lib/sqlalchemy/sql
parentdcb7e7759ae85b2cc4d6a93fffd9746365ffe45a (diff)
downloadsqlalchemy-0fefc6e22641287100eb0648cf1264daeefeb020.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. Conflicts: lib/sqlalchemy/sql/schema.py
Diffstat (limited to 'lib/sqlalchemy/sql')
-rw-r--r--lib/sqlalchemy/sql/compiler.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py
index d53753691..ad92396ee 100644
--- a/lib/sqlalchemy/sql/compiler.py
+++ b/lib/sqlalchemy/sql/compiler.py
@@ -786,8 +786,9 @@ class SQLCompiler(engine.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)