cadrumo.domain.modelos.repository module¶
Encrypted SQL repository for the modelo work-unit catalogue.
WorkUnitCatalogueRepository persists
WorkUnit records in a WorkUnitCatalogue at
FINANCIAL SensitivityClass
through
SecureObjectRepository. The
catalogue is serialised as a single
Envelope-wrapped JSON payload keyed
by a stable namespace and object key; the underlying column is encrypted so no
plaintext work-unit metadata lands on disk.
The storage contract is declared by
cadrumo.adapters.persistence.storage.secure_object_namespaces.MODELO_WORK_UNIT_CATALOGUE_NAMESPACE;
its default object key is the singleton catalogue row.
- exception WorkUnitPersistenceError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
ModeloErrorRaised when the work-unit catalogue cannot be loaded or saved.
This wraps storage-boundary failures from
WorkUnitCatalogueRepositorywhile preserving translated recovery context for callers.- Parameters:
- Return type:
None
- code¶
- upsert_work_unit(catalogue, unit)[source]¶
Return a new
WorkUnitCataloguewithunitinserted or replaced.The input catalogue is not mutated. The returned catalogue carries the same work units as the input plus
unitat its deterministicwork_unit_id; any existing entry under that id is replaced.- Return type:
- Parameters:
catalogue (WorkUnitCatalogue)
unit (WorkUnit)