class PathRegistry(HasCacheKey):
Known subclasses: sqlalchemy.orm.path_registry.AbstractEntityRegistry
, sqlalchemy.orm.path_registry.PropRegistry
, sqlalchemy.orm.path_registry.RootRegistry
, sqlalchemy.orm.path_registry.TokenRegistry
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 | deserialize_context_dict |
Undocumented |
Class Method | per_mapper |
Undocumented |
Class Method | serialize_context_dict |
Undocumented |
Class Method | _deserialize_path |
Undocumented |
Class Method | _serialize_path |
Undocumented |
Method | __add__ |
Undocumented |
Method | __eq__ |
Undocumented |
Method | __hash__ |
Undocumented |
Method | __len__ |
Undocumented |
Method | __ne__ |
Undocumented |
Method | __reduce__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | contains |
Undocumented |
Method | contains_mapper |
Undocumented |
Method | get |
Undocumented |
Method | pairs |
Undocumented |
Method | serialize |
Undocumented |
Method | set |
Undocumented |
Method | setdefault |
Undocumented |
Method | token |
Undocumented |
Class Variable | __slots__ |
Undocumented |
Class Variable | _cache_key_traversal |
Undocumented |
Class Variable | is_root |
Undocumented |
Class Variable | is_token |
Undocumented |
Property | _path_for_compare |
Undocumented |
Property | length |
Undocumented |
Inherited from HasCacheKey
:
Class Variable | inherit_cache |
Indicate if this .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 | _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 |
tuple
=
sqlalchemy.orm.path_registry.AbstractEntityRegistry
, sqlalchemy.orm.path_registry.TokenRegistry
Undocumented