Expand description
CAL executor — runs parsed CAL queries against a CalStoreFacade.
The executor takes a parsed CalQuery (or a raw CAL string, which it
parses internally) and executes it against a &dyn CalStoreFacade,
returning a CalExecResult.
§Security conditions
- S-2: Tier 1 (evolve) statements —
Add,Supersede,Accumulate— execute by default (CalExecutorConfig::tier1_enabled = true). They can be disabled by settingtier1_enabled = false.Revertalways returnsUnsupportedregardless of this flag (semantics not yet defined). All Tier 1 writes go through the samePolicyEngine::check_write()and audit trail as the HTTP/gRPC write path, so compliance invariants are preserved. - S-5: Audit MUST NOT log parameter values, only names.
§Compliance conditions
- C-1: The
CalExecResult::query_hashfield is always populated with a SHA-256 of the normalized CAL string (for audit trail). - C-4:
query_hashis the SHA-256 of the normalized (trimmed) query.
Structs§
- Accumulated
Delta - A single delta that was applied during ACCUMULATE.
- CalExec
Result - Result of executing a CAL query.
- CalExecutor
- CAL query executor.
- CalExecutor
Config - Configuration for the CAL executor.
- CalGrain
Result - A single grain in a CAL result set (projected view).
- CalMetadata
- Metadata about a CAL query execution.
- CalQuery
Plan - Query execution plan returned by
EXPLAIN. - CalVersion
Result - One entry in a
HISTORY OFresult. - LetScope
- LET binding scope for an execution context.
Enums§
- CalResult
Payload - The result payload, discriminated by statement type.
- LetValue
- Resolved value of a LET binding.
Functions§
- grain_
matches_ condition - Apply a type-specific field condition to a single grain result.
- grain_
matches_ condition_ tree - Evaluate a full
Conditiontree against a single grain result.