Entity / Operators
Who owns what
| Part | Package | Owns | Does not |
|---|---|---|---|
| The declaration | foldkit-entity (Expr.operator) | the operator's name, version, argument and result schemas, null and collation rules, laws | any behaviour: it is a value |
| A defined operator's meaning | foldkit-entity (definedAs) | what a call means, as an expression of the kernel | an implementation: every interpreter runs the expression |
| The in-memory implementation | foldkit-entity (Operators) | how a primitive operator runs over values, for the reference interpreter, Remote's client, guards, invariants and forms | SQL |
| The SQL implementation | foldkit-remote-drizzle (DrizzleOperators) | the Drizzle SQL a primitive operator compiles to | the in-memory answer it must agree with |
| Evidence | each table (withEvidence) | which laws were tested for that implementation | the declaration: a law declared is a claim until tested |
Nothing registers globally. A table is a value handed to whatever runs a body:
evaluate, Remote.make, bind, a policy. Two tables can differ (a client
that lacks an operator the server has), and what one lacks is refused by name,
never skipped.
A defined operator and a primitive one are the two kinds. Reach for defined whenever the kernel can say it: there is nothing to implement, nothing to test against itself, and the SQL is the SQL of the expression written out. Reach for primitive only for what the kernel cannot say.