class ClassManager(HasMemoized, Dict[
Known subclasses: sqlalchemy.ext.instrumentation._ClassInstrumentationAdapter
Tracks state information at the class level.
Method | __bool__ |
All ClassManagers are non-zero regardless of attribute state. |
Method | __eq__ |
Undocumented |
Method | __hash__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | deferred |
Undocumented |
Method | dict |
Undocumented |
Method | get |
Undocumented |
Method | has |
TODO |
Method | has |
Undocumented |
Method | initialize |
Undocumented |
Method | install |
Undocumented |
Method | install |
Undocumented |
Method | instrument |
Undocumented |
Method | instrument |
Undocumented |
Method | is |
Undocumented |
Method | manage |
Mark this instance as the manager for its class. |
Method | manager |
Undocumented |
Method | new |
Undocumented |
Method | post |
Undocumented |
Method | setup |
Undocumented |
Method | state |
Return a (instance) -> InstanceState callable. |
Method | subclass |
Undocumented |
Method | teardown |
Undocumented |
Method | uninstall |
Undocumented |
Method | uninstall |
Undocumented |
Method | uninstrument |
Undocumented |
Method | unregister |
remove all instrumentation established by this ClassManager. |
Class Variable | registry |
Undocumented |
Instance Variable | class_ |
Undocumented |
Instance Variable | declarative |
Undocumented |
Instance Variable | dispatch |
Undocumented |
Instance Variable | expired |
previously known as deferred_scalar_loader |
Instance Variable | factory |
Undocumented |
Instance Variable | info |
Undocumented |
Instance Variable | init |
Undocumented |
Instance Variable | local |
Undocumented |
Instance Variable | mapper |
Undocumented |
Instance Variable | new |
Undocumented |
Instance Variable | original |
Undocumented |
Instance Variable | originals |
Undocumented |
Property | attributes |
Undocumented |
Property | deferred |
Undocumented |
Property | is |
Undocumented |
Method | _all |
Undocumented |
Method | _all |
return an iterator of all classbound attributes that are implement :class:`.InspectionAttr`. |
Method | _attr |
Return True if the given attribute is fully initialized. |
Method | _collection |
Undocumented |
Method | _finalize |
Undocumented |
Method | _get |
return an attribute on the class without tripping it. |
Method | _instrument |
Undocumented |
Method | _loader |
Undocumented |
Method | _new |
Install a default InstanceState if none is present. |
Method | _scalar |
Undocumented |
Method | _serialize |
Undocumented |
Method | _subclass |
Create a new ClassManager for a subclass of this ClassManager's class. |
Method | _update |
Undocumented |
Class Variable | _state |
Undocumented |
Instance Variable | _bases |
Undocumented |
Instance Variable | _finalized |
Undocumented |
Property | _state |
Undocumented |
@util.deprecated(
def deferred_scalar_loader(self, obj): (source) ¶
Undocumented
InstanceState[ _O]
, key: str
, optimistic: bool
= False) -> bool
:
(source)
¶
TODO
str
, state: InstanceState[ _O]
, factory: _CollectionFactoryType
) -> Tuple[ collections.CollectionAdapter, _AdaptedCollectionProtocol]
:
(source)
¶
Undocumented
str
, inst: QueryableAttribute[ Any]
, propagated: bool
= False):
(source)
¶
Undocumented
str
, collection_class: Type[ Collection[ Any]]
) -> _CollectionFactoryType
:
(source)
¶
Undocumented
Return a (instance) -> InstanceState callable. "state getter" callables should raise either KeyError or AttributeError if no InstanceState could be found for the instance.
@util.deprecated(
deferred_scalar_loader = (source) ¶
Undocumented
return an iterator of all classbound attributes that are implement :class:`.InspectionAttr`. This includes :class:`.QueryableAttribute` as well as extension types such as :class:`.hybrid_property` and :class:`.AssociationProxy`.
Install a default InstanceState if none is present. A private convenience method used by the __init__ decorator.
InstanceState[ _O]
, state_dict: Dict[ str, Any]
) -> _SerializeManager
:
(source)
¶
Undocumented
Create a new ClassManager for a subclass of this ClassManager's class. This is called automatically when attributes are instrumented so that the attributes can be propagated to subclasses against their own class-local manager, without the need for mappers etc. to have already pre-configured managers for the full class hierarchy. Mappers can post-configure the auto-generated ClassManager when needed.
bool
= False, mapper: Optional[ Mapper[ _O]]
= None, registry: Optional[ _RegistryType]
= None, declarative_scan: Optional[ _MapperConfig]
= None, expired_attribute_loader: Optional[ _ExpiredAttributeLoaderProto]
= None, init_method: Optional[ Callable[ ..., None]]
= None):
(source)
¶
Undocumented