class documentation

class AliasOption(interfaces.LoaderOption):

View In Hierarchy

Undocumented

Method __init__ Return a .MapperOption that will indicate to the _query.Query that the main table has been aliased.
Method process​_compile​_state Apply a modification to a given .CompileState.
Class Variable inherit​_cache Indicate if this .HasCacheKey instance should make use of the cache key generation scheme used by its immediate superclass.

Inherited from LoaderOption:

Method process​_compile​_state​_replaced​_entities Apply a modification to a given .CompileState, given entities that were replaced by with_only_columns() or with_entities().

Inherited from CompileStateOption (via LoaderOption):

Class Variable ​_is​_compile​_state Undocumented

Inherited from HasCacheKey (via LoaderOption, CompileStateOption):

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 __slots__ 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 LoaderOption, CompileStateOption):

Class Variable __slots__ Undocumented
Class Variable ​_is​_criteria​_option Undocumented
Class Variable ​_is​_legacy​_option Undocumented
Class Variable ​_is​_strategy​_option Undocumented
Class 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.

Inherited from ExecutableOption (via LoaderOption, CompileStateOption, ORMOption):

Method ​_clone Create a shallow copy of this ExecutableOption.
Class Variable __visit​_name__ Undocumented
Class Variable ​_is​_has​_cache​_key Undocumented

Inherited from HasCopyInternals (via LoaderOption, CompileStateOption, ORMOption, ExecutableOption):

Method ​_copy​_internals Reassign internal elements to be clones of themselves.
@util.deprecated('1.4', 'The :class:`.AliasOption` is not necessary for entities to be matched up to a query that is established via :meth:`.Query.from_statement` and now does nothing.')
def __init__(self, alias):
Return a .MapperOption that will indicate to the _query.Query that the main table has been aliased.
def process_compile_state(self, compile_state):
Apply a modification to a given .CompileState.
inherit_cache: bool =

Indicate if this .HasCacheKey instance should make use of the cache key generation scheme used by its immediate superclass.

The attribute defaults to None, which indicates that a construct has not yet taken into account whether or not its appropriate for it to participate in caching; this is functionally equivalent to setting the value to False, except that a warning is also emitted.

This flag can be set to True on a particular class, if the SQL that corresponds to the object does not change based on attributes which are local to this class, and not its superclass.

See Also

:ref:`compilerext_caching` - General guideslines for setting the .HasCacheKey.inherit_cache attribute for third-party or user defined SQL constructs.