summaryrefslogtreecommitdiff
path: root/test/dialect/postgresql/test_compiler.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-11-05 10:18:42 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2021-11-05 11:55:14 -0400
commit0c44a1e77cfde0f841a4a64140314c6b833efdab (patch)
tree1678a98a75b4b40882c638b9193e52d3b931fd34 /test/dialect/postgresql/test_compiler.py
parent248d232459e38561999c4172acaaddd651c1a933 (diff)
downloadsqlalchemy-0c44a1e77cfde0f841a4a64140314c6b833efdab.tar.gz
use tuple expansion if type._is_tuple, test for Sequence if no type
Fixed regression where the row objects returned for ORM queries, which are now the normal :class:`_sql.Row` objects, would not be interpreted by the :meth:`_sql.ColumnOperators.in_` operator as tuple values to be broken out into individual bound parameters, and would instead pass them as single values to the driver leading to failures. The change to the "expanding IN" system now accommodates for the expression already being of type :class:`.TupleType` and treats values accordingly if so. In the uncommon case of using "tuple-in" with an untyped statement such as a textual statement with no typing information, a tuple value is detected for values that implement ``collections.abc.Sequence``, but that are not ``str`` or ``bytes``, as always when testing for ``Sequence``. Added :class:`.TupleType` to the top level ``sqlalchemy`` import namespace. Fixes: #7292 Change-Id: I8286387e3b3c3752b3bd4ae3560d4f31172acc22
Diffstat (limited to 'test/dialect/postgresql/test_compiler.py')
0 files changed, 0 insertions, 0 deletions