summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql')
-rw-r--r--lib/sqlalchemy/sql/compiler.py6
-rw-r--r--lib/sqlalchemy/sql/dml.py1
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py
index 6d9ab9039..94c7db20a 100644
--- a/lib/sqlalchemy/sql/compiler.py
+++ b/lib/sqlalchemy/sql/compiler.py
@@ -1984,6 +1984,12 @@ class SQLCompiler(Compiled):
text += " VALUES (%s)" % \
', '.join([c[1] for c in crud_params])
+ if insert_stmt._post_values_clause is not None:
+ post_values_clause = self.process(
+ insert_stmt._post_values_clause, **kw)
+ if post_values_clause:
+ text += " " + post_values_clause
+
if returning_clause and not self.returning_precedes_values:
text += " " + returning_clause
diff --git a/lib/sqlalchemy/sql/dml.py b/lib/sqlalchemy/sql/dml.py
index 8f368dcdb..b54b4792d 100644
--- a/lib/sqlalchemy/sql/dml.py
+++ b/lib/sqlalchemy/sql/dml.py
@@ -194,6 +194,7 @@ class ValuesBase(UpdateBase):
_has_multi_parameters = False
_preserve_parameter_order = False
select = None
+ _post_values_clause = None
def __init__(self, table, values, prefixes):
self.table = _interpret_as_from(table)