Union
relationalai.semantics.frontend.base
Union(model: Model, *items: Value)Represents a logical OR / union across multiple branches.
Union is the object created by Model.union. Unlike Match
(created by the | operator), a union combines the results from all
branches rather than picking the first branch that can succeed.
Nested unions are flattened, so m.union(m.union(a, b), c) is equivalent
to m.union(a, b, c).
Parameters
Section titled “Parameters”
(modelModel) - The model this union belongs to.
(*itemsValue, default:()) - Branches to combine. Each branch must return the same number of values.
Most users should not instantiate this class directly. Prefer Model.union
(or the convenience function union).
Inheritance Hierarchy
Section titled “Inheritance Hierarchy”Returned By
Section titled “Returned By”semantics ├── frontend > base │ └── Model │ └── union └── union