OrdinaryQueryDeclaration.optional: def of bendvy-ecs-core@0.1.0.4 Import: import bendvy-ecs-core@0.1.0.4/ordinary_query_declaration.bend as OrdinaryQueryDeclaration Lines 150-155 of bendvy-ecs-core@0.1.0.4/ordinary_query_declaration.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_query_declaration.bend&start_line=150&end_line=155 import Base import bendvy-ecs-core@0.1.0.4/column.bend as Col import bendvy-ecs-core@0.1.0.4/component.bend as Cmp import bendvy-ecs-core@0.1.0.4/ordinary_declaration.bend as Identity import bendvy-ecs-core@0.1.0.4/compose.bend as Q import bendvy-ecs-core@0.1.0.4/capabilities.bend as Cap # Grant read access without excluding rows where the component is absent. # The body handles Found/ComponentAbsent/MissingEntity; optional fabricates no V. # Stale/foreign handles yield MissingEntity and never match as live rows. # Payload projection consumes and returns P, preserving affine ownership. def optional(~S:Data,~P:Type,~Store:Type,~R:Type,~E:Data,~Rest:Type,~V:Data,~Token:Data,~identity:Identity.Declaration,~view:P -> P & V,~take:Store -> Rest & Col.Column,~put:Rest -> Col.Column -> Store) -> Declaration,Cap.Read,V>>: Declaration{Q.read_family(~S,~Store,~R,~E,~Rest,~P,~V,~Token,~take,~put,~view,~Cmp.Family{Identity.key(~S,~P,identity)}),Q.family_match(~S,~Store,~R,~E,~Rest,~P,~V,~Token,~take,~put,~view,~Cmp.Family{Identity.key(~S,~P,identity)},~Q.Optional{}),[Clause{Identity.key(~S,~P,identity),Optional{}}]} Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/capabilities.bend&name=Read https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/column.bend&name=Column https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/component.bend&name=Family https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/compose.bend&name=Frame https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/compose.bend&name=Selection https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/compose.bend&name=family_match https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/compose.bend&name=read_family https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_declaration.bend&name=Declaration https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_declaration.bend&name=key https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_query_declaration.bend&name=Clause https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_query_declaration.bend&name=Declaration https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_query_declaration.bend&name=Mode