aeat.adapters.persistence.storage.sql package¶
SQL substrate: ORM, engine, sessions, repositories, and secure objects.
Public surface for the SQLAlchemy-backed relational storage components.
Re-exports the engine factory (create_engine_from_settings(),
get_engine(), dispose_engine()), session helpers
(get_sessionmaker(), session_scope()), public pydantic record models
(ModeloCatalogueRecord, PortalRecord, PortalAuthMethod,
CorpusArtifactRecord), and the per-domain repositories
(SqlRecordRepository, ModeloRepository, PortalRepository,
CorpusArtifactRepository), and the encrypted key-value store
SecureObjectRepository.
The secure-object surface also exports SecureObjectRecord,
SecureObjectWrite, SecureObjectDeletion,
SecureObjectMetadata, SecureObjectNamespaceIntegrity,
and SecureObjectDecryptabilityRow. The repository stores payloads as
AES-GCM encrypted bytes, stores natural keys through
adapters.persistence.storage.HashedLookup, binds row identity
into AEAD associated data, and gates reads by sensitivity class and schema
version. Listing defaults fail closed on unreadable rows; explicit diagnostic
APIs return typed decryptability metadata without plaintext disclosure.
Schema is materialised from the ORM metadata on first engine access. Runtime route ownership stays in the storage-runtime and repository-factory modules; this package facade only re-exports the SQL storage API.
Submodules¶
- aeat.adapters.persistence.storage.sql._orm module
BaseModeloRowPortalOrmRowCorpusArtifactRowTransactionDateIndexRowSecureObjectRowSecureObjectRow.idSecureObjectRow.namespaceSecureObjectRow.object_keySecureObjectRow.classificationSecureObjectRow.schema_versionSecureObjectRow.written_atSecureObjectRow.revision_idSecureObjectRow.previous_revision_idSecureObjectRow.revision_ancestor_idsSecureObjectRow.previous_payload_hashSecureObjectRow.payload_hashSecureObjectRow.ciphertext_hashSecureObjectRow.revision_written_atSecureObjectRow.write_provenanceSecureObjectRow.source_event_idSecureObjectRow.conflict_policySecureObjectRow.payload
FincaRowFincaRow.idFincaRow.identifierFincaRow.addressFincaRow.valor_catastral_totalFincaRow.valor_catastral_construccionFincaRow.valor_catastral_revision_yearFincaRow.coste_adquisicionFincaRow.coste_adquisicion_construccionFincaRow.acquisition_dateFincaRow.disposal_dateFincaRow.use_typeFincaRow.is_stressed_areaFincaRow.schema_version
ArrendamientoRowArrendamientoRow.idArrendamientoRow.finca_idArrendamientoRow.contract_celebration_dateArrendamientoRow.contract_termination_dateArrendamientoRow.tenant_countArrendamientoRow.qualifying_co_tenant_countArrendamientoRow.tenant_min_ageArrendamientoRow.tenant_max_ageArrendamientoRow.tenant_is_public_adminArrendamientoRow.tenant_is_ley_49_2002_entity_with_social_useArrendamientoRow.tenant_is_imv_beneficiaryArrendamientoRow.dwelling_in_public_programArrendamientoRow.prior_contract_last_rentArrendamientoRow.prior_contract_indexationArrendamientoRow.initial_rentArrendamientoRow.is_first_rentalArrendamientoRow.rehabilitation_finished_dateArrendamientoRow.lau_17_6_compliantArrendamientoRow.schema_versionArrendamientoRow.finca
FincaRendimientoRecordRowFincaGastoRowFincaAmortizacionLedgerRowFincaAmortizacionLedgerRow.idFincaAmortizacionLedgerRow.finca_idFincaAmortizacionLedgerRow.period_yearFincaAmortizacionLedgerRow.dias_alquiladosFincaAmortizacionLedgerRow.basis_usedFincaAmortizacionLedgerRow.amortization_amountFincaAmortizacionLedgerRow.cumulative_amortization_through_yearFincaAmortizacionLedgerRow.schema_versionFincaAmortizacionLedgerRow.finca
metadata
- aeat.adapters.persistence.storage.sql._secure_object_crypto module
- aeat.adapters.persistence.storage.sql._secure_object_integrity module
- aeat.adapters.persistence.storage.sql._secure_object_records module
SecureObjectRecordSecureObjectMetadataSecureObjectDeletionSecureObjectUnreadableSecureObjectRawRowSecureObjectRawRow.row_idSecureObjectRawRow.namespaceSecureObjectRawRow.object_keySecureObjectRawRow.classificationSecureObjectRawRow.schema_versionSecureObjectRawRow.written_atSecureObjectRawRow.payloadSecureObjectRawRow.revision_idSecureObjectRawRow.previous_revision_idSecureObjectRawRow.revision_ancestor_idsSecureObjectRawRow.previous_payload_hashSecureObjectRawRow.payload_hashSecureObjectRawRow.ciphertext_hashSecureObjectRawRow.revision_written_at
SecureObjectNamespaceIntegritySecureObjectDecryptabilityRowSecureObjectDecryptabilityRow.namespaceSecureObjectDecryptabilityRow.row_idSecureObjectDecryptabilityRow.object_keySecureObjectDecryptabilityRow.classificationSecureObjectDecryptabilityRow.schema_versionSecureObjectDecryptabilityRow.written_atSecureObjectDecryptabilityRow.readableSecureObjectDecryptabilityRow.reason
- aeat.adapters.persistence.storage.sql._secure_object_row_codec module
- aeat.adapters.persistence.storage.sql._secure_object_schema module
- aeat.adapters.persistence.storage.sql.engine module
- aeat.adapters.persistence.storage.sql.records module
- aeat.adapters.persistence.storage.sql.repository module
- aeat.adapters.persistence.storage.sql.secure_objects module
SecureObjectRepositorySecureObjectRepository.namespace_registrySecureObjectRepository.engineSecureObjectRepository.exists()SecureObjectRepository.exists_by_raw_key()SecureObjectRepository.iter_all_records_raw()SecureObjectRepository.list_namespaces()SecureObjectRepository.quarantine_unreadable_rows()SecureObjectRepository.probe_namespace_integrity()SecureObjectRepository.iter_namespace_decryptability()SecureObjectRepository.list_keys()SecureObjectRepository.list_records()SecureObjectRepository.load_many()SecureObjectRepository.iter_many_with_failures()SecureObjectRepository.iter_records_with_failures()SecureObjectRepository.load()SecureObjectRepository.save()SecureObjectRepository.save_many()SecureObjectRepository.namespace_payload_hashes()SecureObjectRepository.apply_batch()SecureObjectRepository.save_with_raw_key()SecureObjectRepository.peek_metadata()SecureObjectRepository.delete()
- aeat.adapters.persistence.storage.sql.session module