]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add multivalued insert context for defaults
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 13 Sep 2017 15:39:47 +0000 (11:39 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 16 Sep 2017 16:52:25 +0000 (12:52 -0400)
commitaed2324b4de3c4f3e6cc7f801fc8ddd8e2d9012b
treee182b5f7b2396c980a42621e1d2cf1a962dd9c67
parentd8cddf61f9de1570257c575a149738ecec6a9d91
Add multivalued insert context for defaults

Added a new method :class:`.DefaultExecutionContext.current_parameters`
which is used within a function-based default value generator in
order to retrieve the current parameters being passed to the statement.
The new function differs from the ``.current_parameters`` attribute in
that it also provides for optional grouping of parameters that
correspond to a multi-valued "insert" construct.  Previously it was not
possible to identify the subset of parameters that were relevant to
the function call.

Change-Id: I6894c7b4a2bce3e83c3ade8af0e5b2f8df37b785
Fixes: #4075
doc/build/changelog/migration_12.rst
doc/build/changelog/unreleased_12/4075.rst [new file with mode: 0644]
doc/build/core/defaults.rst
lib/sqlalchemy/engine/base.py
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/sql/crud.py
lib/sqlalchemy/sql/elements.py
test/sql/test_defaults.py