httk.store.store_common¶
Backend-neutral save-path machinery shared by storage backends.
Exceptions¶
An entry id is already owned by a different lineage or alternative group. |
|
Stored identity-excluded metadata differs from a repeated save. |
|
A replacement deduplicated onto a row from a different lineage. |
|
A persisted entry dispatch row does not name exactly its expected backing. |
Classes¶
Configuration used to mint human-readable entry identifiers. |
|
The store surface consumed by |
|
One-save projection cache shared by core identity and SQL encoding. |
|
Weak identity caches shared by storage backends. |
Functions¶
|
Reject a lazy cursor row before a backend attempts to save it. |
Module Contents¶
- class httk.store.store_common.EntryIdScheme¶
Configuration used to mint human-readable entry identifiers.
- Parameters:
base – Dot-separated database namespace.
series – Campaign-series token.
type_in_base – Whether the served entry type is appended to
base.
- exception httk.store.store_common.EntryIdConflictError(table_name, entry_id, existing_logical_id, requested_logical_id)¶
Bases:
ValueErrorAn entry id is already owned by a different lineage or alternative group.
- Parameters:
- table_name¶
- entry_id¶
- existing_logical_id¶
- requested_logical_id¶
- class httk.store.store_common.EntryStore¶
Bases:
ProtocolThe store surface consumed by
httk.store.backend.sql.stored_federation.This protocol deliberately describes the small backend seam used by the federation. The stored-property plan and candidate-stream objects remain backend-specific; their SQL implementations use
searcher().- property entry_layout: tuple[httk.store.storage_layout.EntryFamilyLayout, Ellipsis]¶
Return the configured entry-family layouts in stable order.
- searcher(*, as_of=None)¶
Return a backend searcher used to build candidate ID streams.
- fetch(cls, sid, *, eager=False)¶
Fetch the stored record of
clsidentified bysid.
- fetch_many(cls, sids, *, eager=False)¶
Fetch the stored records of
clsidentified bysids.Batched counterpart of
fetch().- Parameters:
cls (type[_StoredRecord]) – The storable record class.
sids (collections.abc.Sequence[int]) – The stored row identifiers to fetch.
eager (bool) – Whether to fully materialize each record instead of returning lazy rows.
- Returns:
The reconstructed instances in
sidsorder.- Raises:
KeyError – When any requested row is absent.
- Return type:
list[_StoredRecord]
- exception httk.store.store_common.EntryMetadataConflictError¶
Bases:
ValueErrorStored identity-excluded metadata differs from a repeated save.
- exception httk.store.store_common.EntryReplacementError(table_name, predecessor_logical_id, conflicting_logical_id)¶
Bases:
ValueErrorA replacement deduplicated onto a row from a different lineage.
- Parameters:
- table_name¶
- predecessor_logical_id¶
- conflicting_logical_id¶
- exception httk.store.store_common.EntryDispatchIntegrityError¶
Bases:
RuntimeErrorA persisted entry dispatch row does not name exactly its expected backing.
- class httk.store.store_common.SaveProjection(*, store_timestamp=None)¶
One-save projection cache shared by core identity and SQL encoding.
- store_timestamp = None¶
- projector(record_type, source)¶
- content_id(record_type, source, *, extras=None)¶
- httk.store.store_common.reject_cursor_proxy(obj)¶
Reject a lazy cursor row before a backend attempts to save it.
- class httk.store.store_common.IdentityCaches¶
Weak identity caches shared by storage backends.