Skip to main content

Crate zlayer_store

Crate zlayer_store 

Source
Expand description

Centralized domain DB access for ZLayer.

This crate is the home for the generic persistence machinery shared across ZLayer’s SQLite-backed resource stores. Increment 1 hosts:

  • StorageError — the shared error type returned by every storage operation (moved verbatim from zlayer-api::storage).
  • JsonStore and its companions IndexSpec / JsonTable — the generic “blob + optional unique indexes” SQLite adapter. Its engine-neutral name lets the ZLayerZQL mirror swap in a ZQL-backed JsonStore of identical API by overriding the backend module alone.

These were lifted out of crates/zlayer-api/src/storage/ so that domain DB access can be centralized here. zlayer-api re-exports them unchanged, so every existing caller (zlayer_api::storage::{StorageError, IndexSpec, JsonTable, JsonStore}) keeps compiling.

Structs§

IndexSpec
Specification for a single secondary column peeled out of T at write time. All peeled columns are typed TEXT in SQLite; None from the extractor becomes SQL NULL.
JsonStore
Generic blob store keyed by a string id.
JsonTable
Full table specification: name + the ordered list of indexed columns.

Enums§

StorageError
Storage errors