Rindle docs and package mapSkip to main content

Module query_key

Module query_key 

Source
Expand description

QueryKey — the canonical identity of a subscription query, the dedup key of every materialization map (rindled’s MaterializationManager and the room’s materialize-on-presentation bookkeeping, RINDLE-REALTIME-DESIGN.md §4/§10.1). Two subscribers share one materialized pipeline iff their keys are equal; the fingerprint_hex form is the queryKey string that crosses the control planes. Moved here from rindle-server so the daemon and the room compute identical keys by construction.

Structs§

QueryKey
Every daemon-side input that can affect emitted rows for a materialized query.
QueryKeyError
Why a QueryKey could not be computed: the AST failed to serialize to JSON (the canonical byte form). Practically unreachable for a well-formed [Ast].

Enums§

StreamMode
Daemon output stream shape. Daemon subscriptions prefer StreamMode::Normalized for v1, but the mode participates in the query key so future flat streams never accidentally share a materialization.

Functions§

canonical_ast_bytes
Canonical bytes for a typed AST. This is intentionally not caller-provided raw JSON text: serde defaults normalize omitted optional fields, and object keys are sorted recursively before encoding.