cadrumo.domain.modelos.calculation_repository module¶
Domain-side calculation-revision catalogue port surface.
This module owns the pure calculation-revision catalogue vocabulary: the
CalculationRevisionPersistenceError raised at the storage boundary, the
upsert_calculation_revision() pure mutator, and the namespace /
schema-version constants that name the persisted envelope contract. The concrete
encrypted SQL repository lives in the persistence adapter
CalculationRevisionCatalogueRepository,
behind the read-side
CalculationRevisionCatalogueRepositoryProtocol; the
domain package depends only on the structural port.
- exception CalculationRevisionPersistenceError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
ModeloErrorRaised when the calculation-revision catalogue cannot be persisted or loaded.
This wraps storage-boundary failures from the persistence adapter’s
CalculationRevisionCatalogueRepositorywhile preserving translated recovery context for callers.- Parameters:
- Return type:
None
- code¶
- upsert_calculation_revision(catalogue, revision, *, aggregate_context=None)[source]¶
Return a new
CalculationRevisionCataloguewithrevisioninserted or replaced.- Parameters:
catalogue (
CalculationRevisionCatalogue) – Source catalogue to update.revision (
CalculationRevision) – TheCalculationRevisionto insert or replace.aggregate_context (
CalculationRevisionAggregateContext|None) – Joined authorities required whenrevisionis a context-bound rectificativa revision.
- Return type: