Entity / API
foldkit-entity/transition
A declared write as a metakit Transition, so the checker, the prover,
Pairs.commutes and the graph read an Entity's writes as they read
any other transition (the kernel convergence note, "How are an insert and a
delete transitions"). Its own entry, foldkit-entity/transition: a page
that declares writes does not carry it.
The state is the row's place in its table, { present, row }: present
says whether the row is there, row is the Entity's row as the store holds
it. The input is the write's own input, each key in the stored (encoded)
form of its Schema, and supplied holds what no caller passes and no row
holds: the viewer and the time. Each part of a write is a way of writing:
- a set, a link and a context value are
setofrow.<field>; - an increment is
addof the amount (a decrement adds it negated); - an assignment is
setof the expression it computes, read underrow; - an insert is
setofpresentto true, and a delete to false.
Functions
suppliedOf | What transitionOf(write) is supplied when it runs, read once: the viewer's id, the time, and what a path from the viewer's row reads (through read, one row… |
transitionOf | The transition of write. It applies where the row is present (an insert: is not), the write's when and from hold, and the revision it expects is the row's.… |
Interfaces
WriteState | A row's place in its table: whether it is there, and what it holds, as the store holds it. |
Types
WriteInput | A write's input, each key in the stored form of its Schema (Schema.encodeSync(write.input.schema)). |
WriteSupplied | What a write's context supplies: viewer (the asker's id, null for a visitor), now, and, for a context value read from the viewer's row, one viewer:<member>… |
WriteTransition | The transition of a declared write. |