summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/loading.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-06-28 11:59:34 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2020-08-05 22:19:46 -0400
commit30885744142d89740d459f4dae670ba4775d1d8c (patch)
tree0fdd30c0c96778029a48414195f95c5b1fdba30c /lib/sqlalchemy/orm/loading.py
parentc7b489b25802f7a25ef78d0731411295c611cc1c (diff)
downloadsqlalchemy-30885744142d89740d459f4dae670ba4775d1d8c.tar.gz
Documentation updates for 1.4
* major additions to 1.4 migration doc; removed additional verbosity regarding caching methodology and reorganized the doc to present itself more as a "what's changed" guide * as we now have a path for asyncio, update that doc so that we aren't spreading obsolete information * updates to the 2.0 migration guide with latest info, however this is still an architecture doc and not a migration guide yet, will need further rework. * start really talking about 1.x vs. 2.0 style everywhere. Querying is most of the docs so this is going to be a prominent theme, start getting it to fit in * Add introductory documentation for ORM example sections as these are too sparse * new documentation for do_orm_execute(), many separate sections, adding deprecation notes to before_compile() and similar * new example suites to illustrate do_orm_execute(), with_loader_criteria() * modernized horizontal sharding examples and added a separate example to distinguish between multiple databases and single database w/ multiple tables use case * introducing DEEP ALCHEMY, will use zzzeeksphinx 1.1.6 * no name for the alchemist yet however the dragon's name is Flambé Change-Id: Id6b5c03b1ce9ddb7b280f66792212a0ef0a1c541
Diffstat (limited to 'lib/sqlalchemy/orm/loading.py')
-rw-r--r--lib/sqlalchemy/orm/loading.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/loading.py b/lib/sqlalchemy/orm/loading.py
index 601393156..2eb3e1368 100644
--- a/lib/sqlalchemy/orm/loading.py
+++ b/lib/sqlalchemy/orm/loading.py
@@ -141,6 +141,21 @@ def instances(cursor, context):
@util.preload_module("sqlalchemy.orm.context")
def merge_frozen_result(session, statement, frozen_result, load=True):
+ """Merge a :class:`_engine.FrozenResult` back into a :class:`_orm.Session`,
+ returning a new :class:`_engine.Result` object with :term:`persistent`
+ objects.
+
+ See the section :ref:`do_orm_execute_re_executing` for an example.
+
+ .. seealso::
+
+ :ref:`do_orm_execute_re_executing`
+
+ :meth:`_engine.Result.freeze`
+
+ :class:`_engine.FrozenResult`
+
+ """
querycontext = util.preloaded.orm_context
if load:
@@ -184,6 +199,11 @@ def merge_frozen_result(session, statement, frozen_result, load=True):
session.autoflush = autoflush
+@util.deprecated(
+ "2.0",
+ "The :func:`_orm.merge_result` method is superseded by the "
+ ":func:`_orm.merge_frozen_result` function.",
+)
@util.preload_module("sqlalchemy.orm.context")
def merge_result(query, iterator, load=True):
"""Merge a result into this :class:`.Query` object's Session."""