httk.store.store_common

Backend-neutral save-path machinery shared by storage backends.

Exceptions

EntryMetadataConflictError

Stored identity-excluded metadata differs from a repeated save.

EntryDispatchIntegrityError

A persisted entry dispatch row does not name exactly its expected backing.

Classes

EntryStore

The store surface consumed by httk.store.db.stored_federation.

SaveProjection

One-save projection cache shared by core identity and SQL encoding.

IdentityCaches

Weak identity caches shared by storage backends.

Functions

reject_cursor_proxy(obj)

Reject a lazy cursor row before a backend attempts to save it.

Module Contents

class httk.store.store_common.EntryStore[source]

Bases: Protocol

The store surface consumed by httk.store.db.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[Any, Ellipsis][source]

Return the configured entry-family layouts in stable order.

searcher()[source]

Return a backend searcher used to build candidate ID streams.

fetch(cls, sid)[source]

Fetch the stored record of cls identified by sid.

stored_property_plan(family)[source]

Return the backend-specific stored-property plan for one family.

Parameters:

family (type) – The logical entry-family class to plan.

Returns:

The validated stored-property plan consumed by federation.

Return type:

Any

exception httk.store.store_common.EntryMetadataConflictError[source]

Bases: ValueError

Stored identity-excluded metadata differs from a repeated save.

exception httk.store.store_common.EntryDispatchIntegrityError[source]

Bases: RuntimeError

A persisted entry dispatch row does not name exactly its expected backing.

class httk.store.store_common.SaveProjection[source]

One-save projection cache shared by core identity and SQL encoding.

values_by_source: dict[tuple[type, int], collections.abc.Mapping[str, object]][source]
validated: set[tuple[type, int]][source]
metadata_rows: dict[tuple[type, int], collections.abc.Mapping[str, Any]][source]
metadata_children: dict[tuple[type, int, str], Any][source]
metadata_content_ids: dict[tuple[type, int], str][source]
active: set[tuple[type, int]][source]
inserted: list[tuple[type, int]] = [][source]
projector(record_type, source)[source]
content_id(record_type, source)[source]
httk.store.store_common.reject_cursor_proxy(obj)[source]

Reject a lazy cursor row before a backend attempts to save it.

class httk.store.store_common.IdentityCaches[source]

Weak identity caches shared by storage backends.