MCPcopy Create free account
hub / github.com/CloverHealth/temporal-sqlalchemy / make_temporal

Function make_temporal

temporal_sqlalchemy/clock.py:171–181  ·  view source on GitHub ↗

calls into temporal_map to set up temporal tracking for properties

(cls: nine.Type[Clocked])

Source from the content-addressed store, hash-verified

169 """Decorator to add clock and history to an orm model."""
170
171 def make_temporal(cls: nine.Type[Clocked]):
172 """ calls into temporal_map to set up temporal tracking for properties """
173 assert issubclass(cls, Clocked), "add temporal.Clocked to %r" % cls
174 mapper = cls.__mapper__
175 defaults_safety(*props, mapper=mapper)
176 temporal_map(*props,
177 mapper=mapper,
178 activity_class=activity_cls,
179 schema=temporal_schema,
180 allow_persist_on_commit=allow_persist_on_commit)
181 return cls
182
183 return make_temporal
184

Callers

nothing calls this directly

Calls 2

defaults_safetyFunction · 0.85
temporal_mapFunction · 0.85

Tested by

no test coverage detected