]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- A new construct :class:`.Bundle` is added, which allows for specification
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 3 Oct 2013 21:06:55 +0000 (17:06 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 3 Oct 2013 21:06:55 +0000 (17:06 -0400)
commita83378b64005971fe97dff270641bce4967dbb53
treebbfe8fbf510ddde2c71ff4e26cfe893ca9abce92
parent78c5249bf7d39c3aaa4954c7815a1ef48f2776db
-  A new construct :class:`.Bundle` is added, which allows for specification
of groups of column expressions to a :class:`.Query` construct.
The group of columns are returned as a single tuple by default.  The
behavior of :class:`.Bundle` can be overridden however to provide
any sort of result processing to the returned row.  One example included
is :attr:`.Composite.Comparator.bundle`, which applies a bundled form
of a "composite" mapped attribute.
[ticket:2824]
- The :func:`.composite` construct now maintains the return object
when used in a column-oriented :class:`.Query`, rather than expanding
out into individual columns.  This makes use of the new :class:`.Bundle`
feature internally.  This behavior is backwards incompatible; to
select from a composite column which will expand out, use
``MyClass.some_composite.clauses``.
doc/build/changelog/changelog_09.rst
doc/build/changelog/migration_09.rst
doc/build/orm/mapper_config.rst
doc/build/orm/query.rst
lib/sqlalchemy/orm/__init__.py
lib/sqlalchemy/orm/attributes.py
lib/sqlalchemy/orm/descriptor_props.py
lib/sqlalchemy/orm/interfaces.py
lib/sqlalchemy/orm/query.py
test/orm/test_bundle.py [new file with mode: 0644]
test/orm/test_composites.py