diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-01-25 12:57:59 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-01-25 12:57:59 -0500 |
commit | 2cf83604c6ca0df3efa7033c865cbf2beb31cf71 (patch) | |
tree | 84609eda76a2be6eea232ba794c7d12ca0bb20df /lib/sqlalchemy/sql/compiler.py | |
parent | a477f8a61ec60b2fc343d87aa30ef6595c77727d (diff) | |
download | sqlalchemy-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.py | 5 |
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: |