def pair

bendvy-ecs-core@0.1.0.4 · ordinary_query_declaration.bend:124

import bendvy-ecs-core@0.1.0.4/ordinary_query_declaration.bend as OrdinaryQueryDeclaration
import Base

124# Compose two declarations for the same schema and owner into one query.
125# Selection is conjunction, evaluated left then right with short circuiting;
126# grants retain the nested (L & R) shape and clauses retain left-to-right order.
127# Nest pair to combine more than two selections; it does not impose a row order.
128# Example: examples/scheduled-health/registration.bend defines query().
129def pair(~S:Data,~H:Type,~L:Type,~R:Type,~left:Declaration<S,H,L>,~right:Declaration<S,H,R>) -> Declaration<S,H,L & R>:
130  Declaration{(grant(~S,~H,~L,left),grant(~S,~H,~R,right)),both(~H,~selector(~S,~H,~L,left),~selector(~S,~H,~R,right)),List.append(&2,Clause<S>,clauses(~S,~H,~L,left),clauses(~S,~H,~R,right))}

Uses (9)

Used by (2)