Skip to main content

Module query

Module query 

Source
Expand description

Query model.

Pure data, no I/O and no match logic (the match predicate lives in the engine, where it decodes an event). A Query describes which events a decision depends on, and the same query goes into the AppendCondition that guards the append. That reuse is what makes the consistency boundary dynamic: it covers exactly the events the decision read, nothing more.

§Semantics

A query is a set of QueryItems OR’d together, plus a separate Query::All variant that matches everything. Within an item:

  • the event type must match one of the listed types (an empty type list matches any type), and
  • the event tags must contain all of the item’s tags.

So the shape is OR across items, AND within an item’s tags. An item with no tags constrains only on type; an empty Query::Items set matches nothing (an OR over zero alternatives).

Structs§

AppendCondition
The guard on an append call.
QueryItem
One alternative in a Query: a type constraint AND a tag constraint.

Enums§

Query
A query: a set of QueryItems OR’d together, or the catch-all Query::All.