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
check | Check whether store can hold all needed requirements, returning a Result (yieldable in Effect.gen). |
gives | Whether store gives capability to a rule judged as judged says. |
mount | Call 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. |
mountEffect | Effect-native store capability check: fails with StoreRefused when store cannot hold needed. |
refused | The requirements store cannot give. |
Classes
Interfaces
Types
Capability | What 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… |
Isolates | How 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… |
Isolation | How 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… |
Judged | Where 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:… |