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 set of row.<field>;
  • an increment is add of the amount (a decrement adds it negated);
  • an assignment is set of the expression it computes, read under row;
  • an insert is set of present to true, and a delete to false.

Functions

suppliedOfWhat 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…
transitionOfThe 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

WriteStateA row's place in its table: whether it is there, and what it holds, as the store holds it.

Types

WriteInputA write's input, each key in the stored form of its Schema (Schema.encodeSync(write.input.schema)).
WriteSuppliedWhat 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>…
WriteTransitionThe transition of a declared write.