Metakit / API

@doeixd/metakit/store

What a store guarantees of concurrent writes, and what a rule needs of it (@doeixd/metakit/store).

A proof of one step assumes the store runs concurrent writers a certain way. A store or adapter declares what it gives (StoreCapabilities), each rule needs a Capability (@doeixd/metakit/temporal's requirements reads them off a machine and its aggregates), and mount throws where a store is set up to hold a rule it cannot. This module imports no expression code, so a server that only checks its stores carries nothing else of metakit.

Functions

checkCheck whether store can hold all needed requirements, returning a Result (yieldable in Effect.gen).
givesWhether store gives capability to a rule judged as judged says.
mountCall where a store is set up: throws StoreRefused, naming each rule, the capability it needs and the store, when store cannot hold one of needed.
mountEffectEffect-native store capability check: fails with StoreRefused when store cannot hold needed.
refusedThe requirements store cannot give.

Classes

StoreRefusedA store asked to hold rules it cannot.

Interfaces

RequirementOne declared rule, the capability it needs and why.
StoreCapabilitiesWhat a store or adapter declares it guarantees.

Types

CapabilityWhat a rule needs of its store. row-atomic: a guard and the writes it admits apply to one row as one step. parent-serialized: writers of the rows under one…
IsolatesHow far a store's isolation reaches. transaction: a transaction that reads, then writes in a later round trip, is isolated as a whole (SQLite through one…
IsolationHow a store runs concurrent writes. serializable: as if one at a time. read-committed: each statement reads what has committed, so two writers can each read…
JudgedWhere a writer judges a rule. in-statement: inside the statement, or the one batch, that writes, over the rows as that statement finds them. read-first:…