Entity / Expressions
Reference
| Function | Purpose | Null / edge behavior |
|---|---|---|
Expr.eq(a, b) | Equality comparison | Unknown if either side is null |
Expr.isNull, Expr.isNotNull | Check for null | Always returns true or false |
Expr.lt, lte, gt, gte | Ordering comparison | Unknown if null; text needs collation |
Expr.contains(text, search) | ASCII case-insensitive substring | Unknown if null; escapes % and _ |
Expr.in(a, list) | Membership in literal list | Unknown if a null; empty list false |
Expr.and, Expr.or, Expr.not | Three-valued boolean logic | not(unknown) is unknown |
Expr.implies(a, b) | Conditional rule (!a || b) | True where a is false |
Expr.add, Expr.sub | Numeric addition/subtraction | Null if either operand is null |
Expr.whenGiven(input, fn) | Optional filter when input present | Skipped when input is null |
Expr.input(key, schema) | Typed runtime parameter | Validated by schema |
Expr.viewer, Expr.now | Context caller ID and clock | Visitor viewer is null |
relation as operand | Linked Entity ID | Null on empty optional link |
Expr.path(relation, end) | Traverse one link to field/exists | Null on null/hidden link |
Expr.exists(rel, where?) | Child row existence check | Always true or false in SQL |
Expr.is(Entity, tag, fn?) | Match variant Entity case | False on other cases |
Order.asc, desc, chosen | Sort terms over own fields | Nulls last asc, first desc |
Query.dependencies(body) | Fields, inputs, ops, reaches | Tracks filter vs. sort fields |
Query.placement(body, input) | Client list-placement check | Returns NotPlaceable with reason |
Query.unsupported(body, ops) | Check interpreter support | Lists missing operations |
evaluate(body, input, rows) | In-memory reference evaluator | Missing key treated as null |
Judge.query(body, input, row) | Partial-cache evaluator | Missing key returns Unknown |
Next
- See how Entities, guards, writes, and queries fit together in One domain declaration.
- Read where rules live and how
Laws.checkverifies them in Laws. - Learn the full
ExprAPI in thefoldkit-entityREADME.