]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
use _generate_columns_plus_names for ddl returning c populate
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 26 Aug 2025 18:47:34 +0000 (14:47 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 26 Aug 2025 22:13:46 +0000 (18:13 -0400)
commit4c4011b50bf8f2f6acca86b11ae3d900b30034a0
tree2c171f652e9d43d6841fc352593c09e9827a43f5
parentb939befa507b9f400dcee3d7285547a178d6b088
use _generate_columns_plus_names for ddl returning c populate

Improved the implementation of :meth:`.UpdateBase.returning` to use more
robust logic in setting up the ``.c`` collection of a derived statement
such as a CTE.  This fixes issues related to RETURNING clauses that feature
expressions based on returned columns with or without qualifying labels.

Co-authored-by: Juhyeong Ko <dury.ko@gmail.com>
Fixes: #12271
Change-Id: Id0d486d4304002f1affdec2e7662ac2965936f2a
doc/build/changelog/unreleased_20/12271.rst [new file with mode: 0644]
lib/sqlalchemy/sql/dml.py
lib/sqlalchemy/sql/selectable.py
test/sql/test_returning.py