def clause

bendvy-ecs-core@0.1.0.4 · ordinary_resource_system.bend:30

import bendvy-ecs-core@0.1.0.4/ordinary_resource_system.bend as OrdinaryResourceSystem
import Base
import bendvy-ecs-core@0.1.0.4/ordinary_schema.bend as Schema
import bendvy-ecs-core@0.1.0.4/ordinary_query_declaration.bend as Query

30# Derive the resource key/mode clause from the same retained declaration.
31def clause(~S:Data,~R:Type,~H:Type,~Ops:Type,declaration:Declaration<S,R,H,Ops>) -> Query.Clause<S>:
32  match declaration:
33    case Declaration{identity,kind,_}:Query.Clause{Schema.resource_key(~S,~R,identity),kind}

Uses (3)

Used by (6)