Match
Match(model: Model, *items: Statement)Represents a left-to-right fallback across alternative branches.
Match is the object created by the | operator for semantics DSL
values and statements (see Variable.__or__). At execution
time, it evaluates branches left-to-right and picks the first branch that
can succeed for the current bindings.
Each branch must return the same number of values; the result behaves like a derived table with that many columns.
Nested matches are flattened, so (a | b) | c is equivalent to
a | b | c.
Parameters
Section titled “Parameters”Most users should not instantiate this class directly. Use a | b for
fallback/default behavior, or
Model.union to combine results
from multiple branches.
Methods
Section titled “Methods”.__getattr__()
Section titled “.__getattr__()”Match.__getattr__(item) -> ChainFollow a relationship/property from the last returned value.
This forwards attribute access to the last output column of the match,
so you can write expressions like union(Cat, Dog).name or
(a | b).name when the branches return an entity-like value.
Names that start with an underscore are treated as normal Python attribute access.
Parameters:
(itemstr) - Relationship/property name to access.
Returns:
Chain- A chained value rooted at the last output column.
Inheritance Hierarchy
Section titled “Inheritance Hierarchy”Subclassed By
Section titled “Subclassed By”semantics > frontend > base └── Union