class LoaderStrategy: (source)
Known subclasses: sqlalchemy.orm.strategies.AbstractRelationshipLoader
, sqlalchemy.orm.strategies.ColumnLoader
, sqlalchemy.orm.strategies.DeferredColumnLoader
, sqlalchemy.orm.strategies.DoNothingLoader
, sqlalchemy.orm.strategies.UninstrumentedColumnLoader
Describe the loading behavior of a StrategizedProperty object. The ``LoaderStrategy`` interacts with the querying process in three ways: * it controls the configuration of the ``InstrumentedAttribute`` placed on a class to handle the behavior of the attribute. this may involve setting up class-level callable functions to fire off a select operation when the attribute is first accessed (i.e. a lazy load) * it processes the ``QueryContext`` at statement construction time, where it can modify the SQL statement that is being produced. For example, simple column attributes will add their represented column to the list of selected columns, a joined eager loader may establish join clauses to add to the statement. * It produces "row processor" functions at result fetching time. These "row processor" functions populate a particular attribute on a particular mapped instance.
Method | __init__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | create |
Establish row processing functions for a given QueryContext. |
Method | init |
Undocumented |
Method | setup |
Establish column and other state for a given QueryContext. |
Class Variable | __slots__ |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | key |
Undocumented |
Instance Variable | parent |
Undocumented |
Instance Variable | parent |
Undocumented |
Instance Variable | strategy |
Undocumented |
Instance Variable | strategy |
Undocumented |
Class Variable | _strategy |
Undocumented |
ORMCompileState
, query_entity: _MapperEntity
, path: AbstractEntityRegistry
, loadopt: Optional[ _LoadElement]
, mapper: Mapper[ Any]
, result: Result[ Any]
, adapter: Optional[ ORMAdapter]
, populators: _PopulatorDict
):
(source)
¶
sqlalchemy.orm.strategies.ColumnLoader
, sqlalchemy.orm.strategies.DeferredColumnLoader
, sqlalchemy.orm.strategies.ImmediateLoader
, sqlalchemy.orm.strategies.JoinedLoader
, sqlalchemy.orm.strategies.LazyLoader
, sqlalchemy.orm.strategies.NoLoader
, sqlalchemy.orm.strategies.SelectInLoader
, sqlalchemy.orm.strategies.SubqueryLoader
, sqlalchemy.orm.strategies.UninstrumentedColumnLoader
Establish row processing functions for a given QueryContext. This method fulfills the contract specified by MapperProperty.create_row_processor(). StrategizedProperty delegates its create_row_processor() method directly to this method.
sqlalchemy.orm.strategies.ColumnLoader
, sqlalchemy.orm.strategies.DeferredColumnLoader
, sqlalchemy.orm.strategies.ImmediateLoader
, sqlalchemy.orm.strategies.JoinedLoader
, sqlalchemy.orm.strategies.LazyLoader
, sqlalchemy.orm.strategies.NoLoader
, sqlalchemy.orm.strategies.SelectInLoader
, sqlalchemy.orm.strategies.SubqueryLoader
, sqlalchemy.orm.writeonly.WriteOnlyLoader
Undocumented
ORMCompileState
, query_entity: _MapperEntity
, path: AbstractEntityRegistry
, loadopt: Optional[ _LoadElement]
, adapter: Optional[ ORMAdapter]
, **kwargs: Any
):
(source)
¶
sqlalchemy.orm.strategies.ColumnLoader
, sqlalchemy.orm.strategies.DeferredColumnLoader
, sqlalchemy.orm.strategies.JoinedLoader
, sqlalchemy.orm.strategies.UninstrumentedColumnLoader
Establish column and other state for a given QueryContext. This method fulfills the contract specified by MapperProperty.setup(). StrategizedProperty delegates its setup() method directly to this method.