pub struct EventFilter {Show 14 fields
pub ids: Vec<Uuid>,
pub target_id: Option<Uuid>,
pub kinds: Vec<EventKind>,
pub verbs: Vec<String>,
pub substrates: Vec<SubstrateKind>,
pub actors: Vec<String>,
pub after: Option<i64>,
pub before: Option<i64>,
pub session_id: Option<Uuid>,
pub observed: Vec<Uuid>,
pub selected: Vec<Uuid>,
pub payload_proposal_id: Option<Uuid>,
pub outcome: Option<EventOutcome>,
pub payload_equalities: Vec<(String, SqlValue)>,
}Expand description
Filter for querying events. Namespace is implicit in the scoped EventStore.
New fields deserialize to defaults for older serialized filters. Complete
external Rust struct literals must specify them or use ..Default::default().
Fields§
§ids: Vec<Uuid>§target_id: Option<Uuid>Exact event subject, independent of the graph observation projection.
kinds: Vec<EventKind>§verbs: Vec<String>§substrates: Vec<SubstrateKind>§actors: Vec<String>§after: Option<i64>§before: Option<i64>§session_id: Option<Uuid>§observed: Vec<Uuid>§selected: Vec<Uuid>§payload_proposal_id: Option<Uuid>§outcome: Option<EventOutcome>Exact outcome; no restriction when absent.
payload_equalities: Vec<(String, SqlValue)>ANDed SQL JSON equalities; see EventFilter::payload_eq.
Implementations§
Source§impl EventFilter
impl EventFilter
Sourcepub fn outcome(self, outcome: EventOutcome) -> Self
pub fn outcome(self, outcome: EventOutcome) -> Self
Match one outcome, replacing any previous outcome selection.
Sourcepub fn payload_eq(self, path: impl Into<String>, value: SqlValue) -> Self
pub fn payload_eq(self, path: impl Into<String>, value: SqlValue) -> Self
Require SQL json_extract(payload, path) = value equality.
Paths must be $.field[.subfield] with nonempty ASCII alphanumeric or
underscore segments; queries reject other paths. Calls are ANDed.
SQL NULL matches neither a missing field nor explicit JSON null.
JSON booleans compare as 0/1, including numeric coercion. JSON objects
and arrays compare their serialized SQL text, not structural JSON equality.