summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/crud.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2023-04-28 12:07:09 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2023-05-09 10:08:52 -0400
commit4a62625d99470c8928422c4822df5234b93b6bb8 (patch)
tree280182818aea6846f1294705357b6a0754d51df4 /lib/sqlalchemy/sql/crud.py
parent39c8e95b1f50190ff30a836b2bcf13ba2cacc052 (diff)
downloadsqlalchemy-4a62625d99470c8928422c4822df5234b93b6bb8.tar.gz
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
Diffstat (limited to 'lib/sqlalchemy/sql/crud.py')
-rw-r--r--lib/sqlalchemy/sql/crud.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/crud.py b/lib/sqlalchemy/sql/crud.py
index 563f61c04..16d5ce494 100644
--- a/lib/sqlalchemy/sql/crud.py
+++ b/lib/sqlalchemy/sql/crud.py
@@ -1344,7 +1344,7 @@ def _get_update_multitable_params(
):
normalized_params = {
coercions.expect(roles.DMLColumnRole, c): param
- for c, param in stmt_parameter_tuples
+ for c, param in stmt_parameter_tuples or ()
}
include_table = compile_state.include_table_with_column_exprs