class documentation

class LoaderCriteriaOption(CriteriaOption): (source)

View In Hierarchy

Add additional WHERE criteria to the load for all occurrences of a particular entity. :class:`_orm.LoaderCriteriaOption` is invoked using the :func:`_orm.with_loader_criteria` function; see that function for details. .. versionadded:: 1.4

Method __init__ Undocumented
Method __reduce__ Undocumented
Method get_global_criteria update additional entity criteria options in the given attributes dictionary.
Method process_compile_state Apply a modification to a given :class:`.CompileState`.
Method process_compile_state_replaced_entities Apply a modification to a given :class:`.ORMCompileState`, given entities that were replaced by with_only_columns() or with_entities().
Class Variable __slots__ Undocumented
Instance Variable deferred_where_criteria Undocumented
Instance Variable entity Undocumented
Instance Variable include_aliases Undocumented
Instance Variable propagate_to_loaders if True, indicate this option should be carried along to "secondary" SELECT statements that occur for relationship lazy loaders as well as attribute load / refresh operations.
Instance Variable root_entity Undocumented
Instance Variable where_criteria Undocumented
Class Method _unreduce Undocumented
Method _all_mappers Undocumented
Method _resolve_where_criteria Undocumented
Method _should_include Undocumented
Class Variable _traverse_internals Undocumented
Instance Variable _where_crit_orig Undocumented

Inherited from CriteriaOption:

Class Variable _is_criteria_option Undocumented

Inherited from CompileStateOption (via CriteriaOption):

Class Variable _is_compile_state Undocumented

Inherited from HasCacheKey (via CriteriaOption, CompileStateOption):

Class Variable inherit_cache Indicate if this :class:`.HasCacheKey` instance should make use of the cache key generation scheme used by its immediate superclass.
Class Method _generate_cache_attrs generate cache key dispatcher for a new class.
Class Method _generate_cache_key_for_object Undocumented
Method _gen_cache_key return an optional cache key.
Method _generate_cache_key return a cache key.
Class Variable _generated_cache_key_traversal Undocumented
Class Variable _hierarchy_supports_caching private attribute which may be set to False to prevent the inherit_cache warning from being emitted for a hierarchy of subclasses.
Class Variable _is_has_cache_key Undocumented

Inherited from ORMOption (via CriteriaOption, CompileStateOption, HasCacheKey):

Method _adapt_cached_option_to_uncached_option adapt this option to the "uncached" version of itself in a loader strategy context.
Class Variable _is_core Undocumented
Class Variable _is_legacy_option Undocumented
Class Variable _is_strategy_option Undocumented
Class Variable _is_user_defined Undocumented

Inherited from ExecutableOption (via CriteriaOption, CompileStateOption, HasCacheKey, ORMOption):

Class Variable __visit_name__ Undocumented
Method _clone Create a shallow copy of this ExecutableOption.

Inherited from HasCopyInternals (via CriteriaOption, CompileStateOption, HasCacheKey, ORMOption, ExecutableOption):

Method _copy_internals Reassign internal elements to be clones of themselves.

Inherited from HasTraverseInternals (via CriteriaOption, CompileStateOption, HasCacheKey, ORMOption, ExecutableOption, HasCopyInternals):

Method get_children Return immediate child :class:`.visitors.HasTraverseInternals` elements of this :class:`.visitors.HasTraverseInternals`.
Class Variable _is_immutable Undocumented
def __init__(self, entity_or_base: _EntityType[Any], where_criteria: _ColumnExpressionArgument[bool], loader_only: bool = False, include_aliases: bool = False, propagate_to_loaders: bool = True, track_closure_variables: bool = True): (source)

Undocumented

def __reduce__(self): (source)

Undocumented

def get_global_criteria(self, attributes: Dict[Any, Any]): (source)

update additional entity criteria options in the given attributes dictionary.

def process_compile_state(self, compile_state: ORMCompileState): (source)

Apply a modification to a given :class:`.CompileState`.

def process_compile_state_replaced_entities(self, compile_state: ORMCompileState, mapper_entities: Iterable[_MapperEntity]): (source)

Apply a modification to a given :class:`.ORMCompileState`, given entities that were replaced by with_only_columns() or with_entities(). This method is part of the implementation of a particular :class:`.CompileStateOption` and is only invoked internally when an ORM query is compiled. .. versionadded:: 1.4.19

deferred_where_criteria: bool = (source)

Undocumented

Undocumented

include_aliases = (source)

Undocumented

propagate_to_loaders = (source)

if True, indicate this option should be carried along to "secondary" SELECT statements that occur for relationship lazy loaders as well as attribute load / refresh operations.

root_entity = (source)

Undocumented

where_criteria = (source)

Undocumented

@classmethod
def _unreduce(cls, entity, where_criteria, include_aliases, propagate_to_loaders): (source)

Undocumented

def _all_mappers(self) -> Iterator[Mapper[Any]]: (source)

Undocumented

def _resolve_where_criteria(self, ext_info: _InternalEntityType[Any]) -> ColumnElement[bool]: (source)

Undocumented

def _should_include(self, compile_state: ORMCompileState) -> bool: (source)

Undocumented

_where_crit_orig = (source)

Undocumented