]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Warn / raise for returning() / return_defaults() combinations
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 11 Nov 2020 16:13:27 +0000 (11:13 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 11 Nov 2020 16:36:06 +0000 (11:36 -0500)
commit1f7969ae50d4be92f330d2cf6a2df9aba8b307bf
tree4f69ab010b08db8cf6570849b25c4359cf463b97
parentafb26d79d7b9256ee26b4d3b8550f7088f4b6249
Warn / raise for returning() / return_defaults() combinations

A warning is emmitted if a returning() method such as
:meth:`_sql.Insert.returning` is called multiple times, as this does not
yet support additive operation.  Version 1.4 will support additive
operation for this.  Additionally, any combination of the
:meth:`_sql.Insert.returning` and :meth:`_sql.Insert.return_defaults`
methods now raises an error as these methods are mutually exclusive;
previously the operation would fail silently.

Fixes: #5691
Change-Id: Id95e0f9da48bba0b59439cb26564f0daa684c8e3
doc/build/changelog/unreleased_13/5691.rst [new file with mode: 0644]
doc/build/tutorial/data.rst
lib/sqlalchemy/sql/dml.py
test/sql/test_returning.py