Sync / API
foldkit-sync/entity
foldkit-sync/entity: edits to rows a server owns, kept in a replicated
slice that the journal owns. foldkit-sync/remote shows them over the rows
Remote reads.
The journal orders the edits and stamps each with the sequence it
committed at (at) and who committed it from where (by); the table is
the journal's read model, each row carrying the highest sequence it has
applied (revision). An edit the table holds is absorbed: the server says
so (absorbed), every replica drops it, and the journal compacts.
Everything here is pure: it owns no state, does no I/O, and sends nothing.
The application keeps the edits in its Model and calls these from
update, the stamp, and Sync.mount's onReinstall.
Namespaces
EditableEntity | Edits to an Entity's members, kept per cell in a replicated slice and laid over its rows. |
Values
Author | Who committed an edit: the actor, shown in words, and the replica (a tab), which says whose it is. |
Interfaces
EntityFields | What make reads of an Entity: each member's schema, id among them. |
Replaced | A cell this replica last wrote that a later edit replaced: its edit, and what the cell holds now. |
Types
CellEdit | A cell's edit as the slice keeps it: committed at by by, or, with neither, pending. |
Change | One cell's new value: the member and a value of that member's type, together. |
Member | The members an edit can change: every field but id. |
RowOf | A row as the table holds it: its id, the revision it has applied, and its members. |