]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- The ``version_id_generator`` parameter of ``Mapper`` can now be specified
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 25 Aug 2013 18:03:54 +0000 (14:03 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 25 Aug 2013 18:03:54 +0000 (14:03 -0400)
commitd6ce68727f8ad4c77cc64ac6bbc5fc17ecd2b8e3
tree402e29083415154f31b46da58b22b352f71aca7f
parent00f3ca98ce24577f6a7fb40efd15bdb2d86acd26
- The ``version_id_generator`` parameter of ``Mapper`` can now be specified
to rely upon server generated version identifiers, using triggers
or other database-provided versioning features, by passing the value
``False``.  The ORM will use RETURNING when available to immediately
load the new version identifier, else it will emit a second SELECT.
[ticket:2793]
- The ``eager_defaults`` flag of :class:`.Mapper` will now allow the
newly generated default values to be fetched using an inline
RETURNING clause, rather than a second SELECT statement, for backends
that support RETURNING.
- Added a new variant to :meth:`.ValuesBase.returning` called
:meth:`.ValuesBase.return_defaults`; this allows arbitrary columns
to be added to the RETURNING clause of the statement without interfering
with the compilers usual "implicit returning" feature, which is used to
efficiently fetch newly generated primary key values.  For supporting
backends, a dictionary of all fetched values is present at
:attr:`.ResultProxy.returned_defaults`.
- add a glossary entry for RETURNING
- add documentation for version id generation, [ticket:867]
18 files changed:
doc/build/changelog/changelog_09.rst
doc/build/core/dml.rst
doc/build/core/types.rst
doc/build/glossary.rst
doc/build/orm/exceptions.rst
doc/build/orm/mapper_config.rst
doc/build/static/docs.css
lib/sqlalchemy/engine/base.py
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/engine/result.py
lib/sqlalchemy/orm/mapper.py
lib/sqlalchemy/orm/persistence.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/dml.py
lib/sqlalchemy/sql/expression.py
test/orm/test_unitofwork.py
test/orm/test_versioning.py
test/sql/test_returning.py