]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Infer types in BindParameter when expanding=True
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 8 Apr 2021 01:43:17 +0000 (21:43 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 8 Apr 2021 14:29:08 +0000 (10:29 -0400)
commitdf078a6fb010e28cb14afa1f0947add1f60e0e52
treecebfa19139094d45347373bfdc830c8f675881f1
parent4d21920638af4729b6ff09b1ac8c3a20878bd922
Infer types in BindParameter when expanding=True

Enhanced the "expanding" feature used for :meth:`_sql.ColumnOperators.in_`
operations to infer the type of expression from the right hand list of
elements, if the left hand side does not have any explicit type set up.
This allows the expression to support stringification among other things.
In 1.3, "expanding" was not automatically used for
:meth:`_sql.ColumnOperators.in_` expressions, so in that sense this change
fixes a behavioral regression.

Fixes: #6222
Change-Id: Icdfda1e2c226a21896cafd6d8f251547794451c2
doc/build/changelog/unreleased_14/6222.rst [new file with mode: 0644]
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/sqltypes.py
test/sql/test_compare.py
test/sql/test_operators.py
test/sql/test_selectable.py