]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add Query.enable_single_entity()
authorEric Atkin <eatkin@certusllc.us>
Wed, 28 Feb 2018 21:00:38 +0000 (16:00 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 6 Mar 2018 02:41:55 +0000 (21:41 -0500)
commit1eec99f8ab92ab29b776d17a0b49a9406be7e0d2
treee039fdee3f54d65da81087e44bd15cf68755aaf3
parentdc117f8c66229a3ae0fd9272aa04bd455a669c67
Add Query.enable_single_entity()

Added new feature :meth:`.Query.only_return_tuples`.  Causes the
:class:`.Query` object to return keyed tuple objects unconditionally even
if the query is against a single entity.   Pull request courtesy Eric
Atkin.

Change-Id: Ib0b7f5f78431aa68082e5b200ed577daa4222336
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/425
(cherry picked from commit 451f81ef53a8065db20257af2a4a245196cc07d9)
doc/build/changelog/unreleased_12/single_entity.rst [new file with mode: 0644]
lib/sqlalchemy/orm/loading.py
lib/sqlalchemy/orm/query.py
test/orm/test_query.py