roboto.domain.triggers.conditions#
Module Contents#
- class roboto.domain.triggers.conditions.ConditionMatcher(namespace, default_root)#
Evaluates a trigger condition tree against an event namespace.
Reuses the query
Conditioncomparators unchanged; only the value source differs. Each leaf routes to the namespace root its field targets and matches against that root’s record, so roots hydrate lazily on first reference. A root whose record is missing evaluates to a non-match, soNOT_EXISTSandIS_NULLnever match against an entity that was deleted before evaluation.- Parameters:
namespace (roboto.domain.triggers.namespace.EventNamespace)
default_root (str)
- matches(condition)#
Return whether
conditionholds for the event. ANonecondition always matches.- Parameters:
condition (Optional[roboto.query.ConditionType])
- Return type:
bool
- roboto.domain.triggers.conditions.UNSTRIPPED_ROOTS: frozenset[str]#
Namespace roots the query
Fieldparser does not recognize as resource prefixes, so it leaves them in the lookup path (changed.vehicle_idstays whole, unlikedataset.xwhich strips tox). Derived from the default catalog’s exposed roots.
- roboto.domain.triggers.conditions.explicit_root(condition)#
Return the namespace root
condition’s field explicitly names, orNoneif unqualified.dataset.*/file.*/topic.*/msgpath.*prefixes are recognized by the query field parser; any other first segment counts as a root only when it is inUNSTRIPPED_ROOTS. An unqualified field binds to the event’s default root.- Parameters:
condition (roboto.query.Condition)
- Return type:
Optional[str]
- roboto.domain.triggers.conditions.iter_leaf_conditions(condition)#
Yield every leaf
Conditionincondition, depth-first.- Parameters:
condition (roboto.query.ConditionType)
- Return type:
collections.abc.Iterator[roboto.query.Condition]