]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
raise for same param name in expanding + non expanding
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 13 May 2022 19:43:53 +0000 (15:43 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 15 May 2022 21:26:57 +0000 (17:26 -0400)
commit405f6afaaa8177726428b6738f5fd331341cc74e
tree37df63eaa1ad098966e7b665fdfcd46dc2919d62
parent067102a304012ce6afd0097627d5717994930488
raise for same param name in expanding + non expanding

An informative error is raised if two individual :class:`.BindParameter`
objects share the same name, yet one is used within an "expanding" context
(typically an IN expression) and the other is not; mixing the same name in
these two different styles of usage is not supported and typically the
``expanding=True`` parameter should be set on the parameters that are to
receive list values outside of IN expressions (where ``expanding`` is set
by default).

Fixes: #8018
Change-Id: Ie707f29680eea16b9e421af93560ac1958e11a54
(cherry picked from commit f9fccdeeb6749d10aeec458f1a549906d58ddad8)
doc/build/changelog/unreleased_14/8018.rst [new file with mode: 0644]
lib/sqlalchemy/sql/compiler.py
test/sql/test_compiler.py