summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/dml.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-01-13 14:33:33 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2015-01-13 14:33:33 -0500
commit92cc232726a01dd3beff762ebccd326a9659e8b9 (patch)
treea33faba2cdadd6f016feaff214fb8e2f5ecdbdb3 /lib/sqlalchemy/sql/dml.py
parentdc55ff6f99098450f20aa702a55ece30b7e5fc7c (diff)
downloadsqlalchemy-92cc232726a01dd3beff762ebccd326a9659e8b9.tar.gz
- The multi-values version of :meth:`.Insert.values` has been
repaired to work more usefully with tables that have Python- side default values and/or functions, as well as server-side defaults. The feature will now work with a dialect that uses "positional" parameters; a Python callable will also be invoked individually for each row just as is the case with an "executemany" style invocation; a server- side default column will no longer implicitly receive the value explicitly specified for the first row, instead refusing to invoke without an explicit value. fixes #3288
Diffstat (limited to 'lib/sqlalchemy/sql/dml.py')
-rw-r--r--lib/sqlalchemy/sql/dml.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/dml.py b/lib/sqlalchemy/sql/dml.py
index 62169319b..38b3b8c44 100644
--- a/lib/sqlalchemy/sql/dml.py
+++ b/lib/sqlalchemy/sql/dml.py
@@ -277,6 +277,12 @@ class ValuesBase(UpdateBase):
deals with an arbitrary number of rows, so the
:attr:`.ResultProxy.inserted_primary_key` accessor does not apply.
+ .. versionchanged:: 1.0.0 A multiple-VALUES INSERT now supports
+ columns with Python side default values and callables in the
+ same way as that of an "executemany" style of invocation; the
+ callable is invoked for each row. See :ref:`bug_3288`
+ for other details.
+
.. seealso::
:ref:`inserts_and_updates` - SQL Expression