Learn / Glossary
Domain rules and permissions (foldkit-entity & foldkit-guard)
| Term | Meaning | Guide |
|---|---|---|
| Entity | A named record type with an id, shared by client views, forms, and the server. | Domain |
| Domain module | Shared module declaring Entities, relations, queries, writes, invariants, and guards. | Domain |
| Relation | Typed link between Entities (Relation.one or Relation.many) stored by id. | Domain |
| Derived member | Computed or server-supplied read value on an Entity, such as a related count. | Entity |
| Selection | Typed list of fields and nested relations (Entity.select) a screen reads. | Entity |
Expr | Filter or check built as data so both SQL and client code evaluate it identically. | Expressions |
| Query body | Filter and sort order (Query.from(Entity)) run as SQL on servers or JS on clients. | Expressions |
| Collation | Explicit text comparison rule (binary, asciiFold, or locale). | Expressions |
Judge | Evaluates a Query body against held rows and returns Known or Unknown. | Expressions |
| Interpreter | Engine that runs an Expr or Query (SQL compiler, in-memory runner, or Judge). | Expressions |
| Reach | Fields in other rows that a query reads across a relation. | Expressions |
| Holder | Partial set of cached rows where unread fields are missing, not null. | Expressions |
| Operator | Custom comparison added to Expr (Expr.operator) and implemented per engine. | Operators |
| Context set | Field filled automatically on the server (such as author or timestamp), never input. | Declared writes |
| Declared write | Single-row insert, update, or delete (Write.update, insert, delete) as data. | Declared writes |
| Precondition | A write's when rule over the existing row; fails with Unmet if false. | Declared writes |
| Invariant | Rule (Entity.invariant) every row must satisfy; violations fail with Invalid. | Laws |
| Refinement | Named state of a row (Draft, Published) reused in queries, guards, and writes. | Laws |
| Increment | Atomic numeric addition (stock = stock + ?) inside a declared write. | Declared writes |
| Guard | Permission rule saying who may read or write an Entity, enforced on the server. | Guard |
| Principal | The signed-in actor (user, service, or none) checked by Guards on every request. | Auth and Guard |