class documentation

Represent query load paths and registry functions. Basically represents structures like: (<User mapper>, "orders", <Order mapper>, "items", <Item mapper>) These structures are generated by things like query options (joinedload(), subqueryload(), etc.) and are used to compose keys stored in the query._attributes dictionary for various options. They are then re-composed at query compile/result row time as the query is formed and as rows are fetched, where they again serve to compose keys to look up options in the context.attributes dictionary, which is copied from query._attributes. The path structure has a limited amount of caching, where each "root" ultimately pulls from a fixed registry associated with the first mapper, that also contains elements for each of its property keys. However paths longer than two elements, which are the exception rather than the rule, are generated on an as-needed basis.

Class Method coerce Undocumented
Class Method deserialize Undocumented
Class Method per_mapper Undocumented
Method __add__ Undocumented
Method __eq__ Undocumented
Method __getitem__ Undocumented
Method __hash__ Undocumented
Method __len__ Undocumented
Method __ne__ Undocumented
Method __reduce__ Undocumented
Method __repr__ Undocumented
Method __str__ Undocumented
Method contains Undocumented
Method contains_mapper Undocumented
Method get Undocumented
Method pairs Undocumented
Method serialize Undocumented
Method set Undocumented
Method setdefault Undocumented
Class Variable __slots__ Undocumented
Class Variable has_entity Undocumented
Class Variable is_entity Undocumented
Class Variable is_property Undocumented
Class Variable is_root Undocumented
Class Variable is_token Undocumented
Class Variable natural_path Undocumented
Class Variable parent Undocumented
Class Variable path Undocumented
Class Variable root Undocumented
Property length Undocumented
Class Method _deserialize_path Undocumented
Class Method _serialize_path Undocumented
Class Variable _cache_key_traversal Undocumented
Property _path_for_compare Undocumented

Inherited from HasCacheKey:

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

Undocumented

@classmethod
def deserialize(cls, path: _SerializedPath) -> PathRegistry: (source)

Undocumented

Undocumented

def __add__(self, other: PathRegistry) -> PathRegistry: (source)

Undocumented

def __eq__(self, other: Any) -> bool: (source)

Undocumented

@overload
def __getitem__(self, entity: str) -> TokenRegistry:
@overload
def __getitem__(self, entity: int) -> _PathElementType:
@overload
def __getitem__(self, entity: slice) -> _PathRepresentation:
@overload
def __getitem__(self, entity: _InternalEntityType[Any]) -> AbstractEntityRegistry:
@overload
def __getitem__(self, entity: MapperProperty[Any]) -> PropRegistry:
(source)

Undocumented

def __hash__(self) -> int: (source)

Undocumented

def __len__(self) -> int: (source)

Undocumented

def __ne__(self, other: Any) -> bool: (source)

Undocumented

def __reduce__(self) -> Any: (source)

Undocumented

def __repr__(self) -> str: (source)

Undocumented

def __str__(self) -> str: (source)

Undocumented

def contains(self, attributes: Dict[Any, Any], key: Any) -> bool: (source)

Undocumented

def contains_mapper(self, mapper: Mapper[Any]) -> bool: (source)

Undocumented

def get(self, attributes: Dict[Any, Any], key: Any, value: Optional[Any] = None) -> Any: (source)

Undocumented

def serialize(self) -> _SerializedPath: (source)

Undocumented

def set(self, attributes: Dict[Any, Any], key: Any, value: Any): (source)

Undocumented

def setdefault(self, attributes: Dict[Any, Any], key: Any, value: Any): (source)

Undocumented

is_property: bool = (source)

Undocumented

Undocumented

Undocumented

@classmethod
def _deserialize_path(cls, path: _SerializedPath) -> _PathRepresentation: (source)

Undocumented

Undocumented

_cache_key_traversal: _CacheKeyTraversalType = (source)

Undocumented

Undocumented