core.orm.observer
Attributes
Classes
This subclass of PropertyObserver doesn't register itself globally. |
Functions
|
Module Contents
- class core.orm.observer.ScopedPropertyObserver(dotted_name: str | None)[source]
Bases:
sqlalchemy_utils.observer.PropertyObserver
This subclass of PropertyObserver doesn’t register itself globally.
Having all observers listen for each application is both wasteful and can lead to bugs if some tables only exist for some applications.
We should never use the base class, since that will always cause all observers to trigger regardless of whether we used the scoped observer or not.
- _global_observer: ClassVar[ScopedPropertyObserver][source]
- _scoped_observers: ClassVar[dict[str, ScopedPropertyObserver]][source]
- update_generator_registry(mapper: sqlalchemy.orm.Mapper, class_: type[Any]) None [source]
Adds generator functions to generator_registry.