class documentation

class MapperOption(ORMOption):

View In Hierarchy

Describe a modification to a Query
Method process​_query Apply a modification to the given _query.Query.
Method process​_query​_conditionally same as process_query(), except that this option may not apply to the given query.
Class Variable ​_is​_legacy​_option Undocumented
Class Variable propagate​_to​_loaders if True, indicate this option should be carried along to "secondary" Query objects produced during lazy loads or refresh operations.

Inherited from ORMOption:

Class Variable __slots__ Undocumented
Class Variable ​_is​_compile​_state Undocumented
Class Variable ​_is​_criteria​_option Undocumented
Class Variable ​_is​_strategy​_option Undocumented

Inherited from ExecutableOption (via 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 ORMOption, ExecutableOption):

Method ​_copy​_internals Reassign internal elements to be clones of themselves.
def process_query(self, query):
Apply a modification to the given _query.Query.
def process_query_conditionally(self, query):

same as process_query(), except that this option may not apply to the given query.

This is typically applied during a lazy load or scalar refresh operation to propagate options stated in the original Query to the new Query being used for the load. It occurs for those options that specify propagate_to_loaders=True.

_is_legacy_option: bool =
propagate_to_loaders: bool =
if True, indicate this option should be carried along to "secondary" Query objects produced during lazy loads or refresh operations.