core.orm.mixins.timestamp

Module Contents

Classes

TimestampMixin

Mixin providing created/modified timestamps for all records.

class core.orm.mixins.timestamp.TimestampMixin[source]

Mixin providing created/modified timestamps for all records.

The columns are deferred loaded as this is primarily for logging and future forensics.

property created: Column[datetime][source]
property modified: Column[datetime | None][source]
static timestamp() datetime.datetime[source]
force_update() None[source]

Forces the model to update by changing the modified parameter.

last_change() datetime.datetime[source]

Returns the self.modified if not NULL, else self.created.

last_change() sqlalchemy.sql.elements.ClauseElement[source]