Learn / Glossary

Domain rules and permissions (foldkit-entity & foldkit-guard)

TermMeaningGuide
EntityA named record type with an id, shared by client views, forms, and the server.Domain
Domain moduleShared module declaring Entities, relations, queries, writes, invariants, and guards.Domain
RelationTyped link between Entities (Relation.one or Relation.many) stored by id.Domain
Derived memberComputed or server-supplied read value on an Entity, such as a related count.Entity
SelectionTyped list of fields and nested relations (Entity.select) a screen reads.Entity
ExprFilter or check built as data so both SQL and client code evaluate it identically.Expressions
Query bodyFilter and sort order (Query.from(Entity)) run as SQL on servers or JS on clients.Expressions
CollationExplicit text comparison rule (binary, asciiFold, or locale).Expressions
JudgeEvaluates a Query body against held rows and returns Known or Unknown.Expressions
InterpreterEngine that runs an Expr or Query (SQL compiler, in-memory runner, or Judge).Expressions
ReachFields in other rows that a query reads across a relation.Expressions
HolderPartial set of cached rows where unread fields are missing, not null.Expressions
OperatorCustom comparison added to Expr (Expr.operator) and implemented per engine.Operators
Context setField filled automatically on the server (such as author or timestamp), never input.Declared writes
Declared writeSingle-row insert, update, or delete (Write.update, insert, delete) as data.Declared writes
PreconditionA write's when rule over the existing row; fails with Unmet if false.Declared writes
InvariantRule (Entity.invariant) every row must satisfy; violations fail with Invalid.Laws
RefinementNamed state of a row (Draft, Published) reused in queries, guards, and writes.Laws
IncrementAtomic numeric addition (stock = stock + ?) inside a declared write.Declared writes
GuardPermission rule saying who may read or write an Entity, enforced on the server.Guard
PrincipalThe signed-in actor (user, service, or none) checked by Guards on every request.Auth and Guard