private module containing functions used to convert database rows into object instances and associated state. the functions here are called primarily by Query, Mapper, as well as some of the attribute loading strategies.
Class |
|
Track loaders and states for "post load" operations. |
Function | get |
Look up the given key in the given session's identity map, check the object for expired state if found. |
Function | instances |
Return a :class:`.Result` given an ORM query context. |
Function | load |
Load the given identity key from the database. |
Function | load |
Load the given primary key identity from the database. |
Function | load |
initiate a column-based attribute refresh operation. |
Function | merge |
Merge a :class:`_engine.FrozenResult` back into a :class:`_orm.Session`, returning a new :class:`_engine.Result` object with :term:`persistent` objects. |
Function | merge |
Merge a result into the given :class:`.Query` object's Session. |
Function | _decorate |
Undocumented |
Function | _instance |
Produce a mapper level row processor callable which processes rows into mapped instances. |
Function | _load |
Undocumented |
Function | _populate |
Undocumented |
Function | _populate |
Undocumented |
Function | _set |
Undocumented |
Function | _setup |
Undocumented |
Function | _validate |
Undocumented |
Function | _warn |
Undocumented |
Type Variable | _O |
Undocumented |
Type Variable | _T |
Undocumented |
Type Alias | _ |
Undocumented |
Variable | _new |
Undocumented |
Session
, mapper: Mapper[ _O]
, key: _IdentityKeyType[ _O]
, passive: PassiveFlag
) -> Union[ LoaderCallableStatus, Optional[ _O]]
:
(source)
¶
Look up the given key in the given session's identity map, check the object for expired state if found.
Return a :class:`.Result` given an ORM query context. :param cursor: a :class:`.CursorResult`, generated by a statement which came from :class:`.ORMCompileState` :param context: a :class:`.QueryContext` object :return: a :class:`.Result` object representing ORM results .. versionchanged:: 1.4 The instances() function now uses :class:`.Result` objects and has an all new interface.
Session
, statement: Union[ Select, FromStatement]
, key: Optional[ _IdentityKeyType]
, *, load_options: Optional[ Sequence[ ORMOption]]
= None, refresh_state: Optional[ InstanceState[ Any]]
= None, with_for_update: Optional[ ForUpdateArg]
= None, only_load_props: Optional[ Iterable[ str]]
= None, no_autoflush: bool
= False, bind_arguments: Mapping[ str, Any]
= util.EMPTY_DICT, execution_options: _ExecuteOptions
= util.EMPTY_DICT, require_pk_cols: bool
= False, is_user_refresh: bool
= False):
(source)
¶
Load the given identity key from the database.
Session
, statement: Union[ Select, FromStatement]
, primary_key_identity: Optional[ Tuple[ Any, ...]]
, *, load_options: Optional[ Sequence[ ORMOption]]
= None, refresh_state: Optional[ InstanceState[ Any]]
= None, with_for_update: Optional[ ForUpdateArg]
= None, only_load_props: Optional[ Iterable[ str]]
= None, identity_token: Optional[ Any]
= None, no_autoflush: bool
= False, bind_arguments: Mapping[ str, Any]
= util.EMPTY_DICT, execution_options: _ExecuteOptions
= util.EMPTY_DICT, require_pk_cols: bool
= False, is_user_refresh: bool
= False):
(source)
¶
Load the given primary key identity from the database.
def merge_frozen_result(session, statement, frozen_result, load=True): (source) ¶
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`
@util.preload_module(
def merge_result(query:
Query[ Any]
, iterator: Union[ FrozenResult, Iterable[ Sequence[ Any]], Iterable[ object]]
, load: bool
= True) -> Union[ FrozenResult, Iterable[ Any]]
:
(source)
¶
Merge a result into the given :class:`.Query` object's Session. See :meth:`_orm.Query.merge_result` for top-level documentation on this function.
Undocumented
Produce a mapper level row processor callable which processes rows into mapped instances.
Undocumented
Undocumented
Undocumented