]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add new "expanding" feature to bindparam()
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 3 Apr 2017 18:34:58 +0000 (14:34 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 7 Apr 2017 19:53:49 +0000 (15:53 -0400)
commit7d9f241d63b76cf3d4a5f1c146554cd9dc140656
treed4945792717ad4eedc509a09ab9f0cf31e60631d
parent93b11905e599a6d73a85d2085e15385ebf46cdc6
Add new "expanding" feature to bindparam()

Added a new kind of :func:`.bindparam` called "expanding".  This is
for use in ``IN`` expressions where the list of elements is rendered
into individual bound parameters at statement execution time, rather
than at statement compilation time.  This allows both a single bound
parameter name to be linked to an IN expression of multiple elements,
as well as allows query caching to be used with IN expressions.  The
new feature allows the related features of "select in" loading and
"polymorphic in" loading to make use of the baked query extension
to reduce call overhead.   This feature should be considered to be
**experimental** for 1.2.

Fixes: #3953
Change-Id: Ie708414a3ab9c0af29998a2c7f239ff7633b1f6e
12 files changed:
doc/build/changelog/changelog_12.rst
doc/build/changelog/migration_12.rst
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/default_comparator.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/testing/requirements.py
lib/sqlalchemy/testing/suite/test_select.py
test/requirements.py
test/sql/test_compiler.py
test/sql/test_operators.py
test/sql/test_query.py