summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/compiler.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-01-25 12:57:59 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2013-01-25 12:57:59 -0500
commit2cf83604c6ca0df3efa7033c865cbf2beb31cf71 (patch)
tree84609eda76a2be6eea232ba794c7d12ca0bb20df /lib/sqlalchemy/sql/compiler.py
parenta477f8a61ec60b2fc343d87aa30ef6595c77727d (diff)
downloadsqlalchemy-2cf83604c6ca0df3efa7033c865cbf2beb31cf71.tar.gz
#2629
insert().returning() raises an informative CompileError if attempted to compile on a dialect that doesn't support RETURNING.
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r--lib/sqlalchemy/sql/compiler.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py
index 152e68e34..59e46de12 100644
--- a/lib/sqlalchemy/sql/compiler.py
+++ b/lib/sqlalchemy/sql/compiler.py
@@ -1248,6 +1248,11 @@ class SQLCompiler(engine.Compiled):
else:
return ""
+ def returning_clause(self, stmt, returning_cols):
+ raise exc.CompileError(
+ "RETURNING is not supported by this "
+ "dialect's statement compiler.")
+
def limit_clause(self, select):
text = ""
if select._limit is not None: