Skip to main content

Module query

Module query 

Source
Expand description

Query match predicate over an encoded event.

The Query data model (Query, QueryItem, AppendCondition) lives in tephra-types and is re-exported here. This module owns the single definition of “does this event match”, evaluated over the zero-copy EventRef.

§One predicate

Matches::matches is the single definition of “does this event match”. The condition evaluator (layer 2) and the index (layer 3) must agree with it exactly; the index is differential-tested against this predicate rather than reimplementing the semantics. Tag containment is a linear merge over two sorted sequences: the item’s tags are sorted (a Tags invariant) and an event’s tags decode in sorted order, so neither side needs sorting at match time.

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.

Traits§

Matches
The match predicate over an encoded event.