diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-11-11 11:13:27 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-11-11 11:36:06 -0500 |
| commit | 1f7969ae50d4be92f330d2cf6a2df9aba8b307bf (patch) | |
| tree | 4f69ab010b08db8cf6570849b25c4359cf463b97 /doc/build/tutorial | |
| parent | afb26d79d7b9256ee26b4d3b8550f7088f4b6249 (diff) | |
| download | sqlalchemy-1f7969ae50d4be92f330d2cf6a2df9aba8b307bf.tar.gz | |
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
Diffstat (limited to 'doc/build/tutorial')
| -rw-r--r-- | doc/build/tutorial/data.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/build/tutorial/data.rst b/doc/build/tutorial/data.rst index 27a21b097..849b706cc 100644 --- a/doc/build/tutorial/data.rst +++ b/doc/build/tutorial/data.rst @@ -1502,7 +1502,7 @@ be iterated:: ... delete(user_table).where(user_table.c.name == 'patrick'). ... returning(user_table.c.id, user_table.c.name) ... ) - >>> print(delete_stmt.returning(user_table.c.id, user_table.c.name)) + >>> print(delete_stmt) {opensql}DELETE FROM user_account WHERE user_account.name = :name_1 RETURNING user_account.id, user_account.name |
