]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
implement tuple-slices from .c collections
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 27 Jul 2022 15:36:57 +0000 (11:36 -0400)
committerFederico Caselli <cfederico87@gmail.com>
Mon, 1 Aug 2022 21:46:33 +0000 (21:46 +0000)
commit1ecbf14cc24aa0b1d303926178941c1f7f9fe93b
tree9d6db71363b3dd90dfc69b5388902d68f9e57cb2
parent3ff18812d8d80b2016ceeea98c808a76cae85e48
implement tuple-slices from .c collections

Added new syntax to the ``.c`` collection on all :class:`.FromClause`
objects allowing tuples of keys to be passed to ``__getitem__()``, along
with support for ``select()`` handling of ``.c`` collections directly,
allowing the syntax ``select(table.c['a', 'b', 'c'])`` to be possible. The
sub-collection returned is itself a :class:`.ColumnCollection` which is
also directly consumable by :func:`_sql.select` and similar now.

Fixes: #8285
Change-Id: I2236662c477ffc50af079310589e213323c960d1
doc/build/changelog/unreleased_20/8285.rst [new file with mode: 0644]
doc/build/core/metadata.rst
doc/build/tutorial/data_select.rst
lib/sqlalchemy/sql/base.py
test/base/test_utils.py
test/orm/test_core_compilation.py
test/sql/test_select.py