Skip to content
Roboto
Esc
↑↓navigate↵open⌘Jpreview
On this page

roboto.domain.triggers.conditions

Module Contents

ConditionMatcher

class roboto.domain.triggers.conditions.ConditionMatcher(namespace, default_root)#View Source

Evaluates a trigger condition tree against an event namespace.

Reuses the query Condition comparators 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, so NOT_EXISTS and IS_NULL never match against an entity that was deleted before evaluation.

Parameters

ConditionMatcher.matches()

matches(condition)#View Source

Return whether condition holds for the event. A None condition always matches.

Parameters

condition Optional[roboto.query.ConditionType]

Return type

bool

UNSTRIPPED_ROOTS

roboto.domain.triggers.conditions.UNSTRIPPED_ROOTS: frozenset[str]#View Source

Namespace roots the query Field parser does not recognize as resource prefixes, so it leaves them in the lookup path (changed.vehicle_id stays whole, unlike dataset.x which strips to x). Derived from the default catalog’s exposed roots.

explicit_root()

roboto.domain.triggers.conditions.explicit_root(condition)#View Source

Return the namespace root condition’s field explicitly names, or None if 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 in UNSTRIPPED_ROOTS. An unqualified field binds to the event’s default root.

Parameters

Return type

Optional[str]

iter_leaf_conditions()

roboto.domain.triggers.conditions.iter_leaf_conditions(condition)#View Source

Yield every leaf Condition in condition, depth-first.

Parameters

Return type

collections.abc.Iterator[roboto.query.Condition]

Was this page helpful?