httk.store.storage_layout¶
Backend-neutral store declaration machinery shared by storage backends.
This module owns the logical entry-family declaration, its canonical JSON encoding, and trust-on-reopen validation. Physical names and backend-specific layout validation belong to each storage backend.
Attributes¶
The current backend-neutral declaration protocol. |
Exceptions¶
A database does not exactly implement the current persisted store layout. |
Classes¶
One immutable configured entry family and its concrete records. |
|
The immutable normalized entry declaration of an initialized store. |
Functions¶
|
Validate an explicit class declaration and replace it with stable registry names. |
|
Serialize a normalized declaration in its exact deterministic persisted form. |
Module Contents¶
- httk.store.storage_layout.DECLARATION_PROTOCOL_VERSION: Final = 'v2.1.0'[source]¶
The current backend-neutral declaration protocol.
- exception httk.store.storage_layout.StorageLayoutUpgradeRequiredError(diff)[source]¶
Bases:
RuntimeErrorA database does not exactly implement the current persisted store layout.
diffis immutable and JSON-shaped. Its top-level keys are stable categories (currentlyprotocol,declarationandschema), so a caller can present a precise upgrade diagnostic without parsing the human-readable exception message.
- class httk.store.storage_layout.EntryFamilyLayout[source]¶
One immutable configured entry family and its concrete records.
- class httk.store.storage_layout.StorageLayout[source]¶
The immutable normalized entry declaration of an initialized store.
- families: tuple[EntryFamilyLayout, Ellipsis][source]¶
- httk.store.storage_layout.normalize_entry_records(entry_records)[source]¶
Validate an explicit class declaration and replace it with stable registry names.
Registry aliases are rejected rather than selected arbitrarily: a persistent declaration must have exactly one stable spelling for every supplied class.