]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
implement FromLinter for UPDATE, DELETE statements
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 28 Apr 2023 16:07:09 +0000 (12:07 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 9 May 2023 14:08:52 +0000 (10:08 -0400)
commit4a62625d99470c8928422c4822df5234b93b6bb8
tree280182818aea6846f1294705357b6a0754d51df4
parent39c8e95b1f50190ff30a836b2bcf13ba2cacc052
implement FromLinter for UPDATE, DELETE statements

Implemented the "cartesian product warning" for UPDATE and DELETE
statements, those which include multiple tables that are not correlated
together in some way.

Fixed issue where :func:`_dml.update` construct that included multiple
tables and no VALUES clause would raise with an internal error. Current
behavior for :class:`_dml.Update` with no values is to generate a SQL
UPDATE statement with an empty "set" clause, so this has been made
consistent for this specific sub-case.

Fixes: #9721
Change-Id: I556639811cc930d2e37532965d2ae751882af921
doc/build/changelog/unreleased_20/9721.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mssql/base.py
lib/sqlalchemy/dialects/mysql/base.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/crud.py
test/sql/test_from_linter.py
test/sql/test_update.py