OrdinaryCaptureQuery.runner: def of bendvy-ecs-core@0.1.0.4 Import: import bendvy-ecs-core@0.1.0.4/ordinary_capture_query.bend as OrdinaryCaptureQuery Lines 20-26 of bendvy-ecs-core@0.1.0.4/ordinary_capture_query.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_capture_query.bend&start_line=20&end_line=26 import Base import bendvy-ecs-core@0.1.0.4/change_tick.bend as Tick import bendvy-ecs-core@0.1.0.4/world.bend as W import bendvy-ecs-core@0.1.0.4/compose.bend as Q import bendvy-ecs-core@0.1.0.4/capture_query.bend as Fold import bendvy-ecs-core@0.1.0.4/ordinary_query_declaration.bend as Decl import bendvy-ecs-core@0.1.0.4/local.bend as Local import bendvy-ecs-core@0.1.0.4/transaction.bend as T # Advanced captured-query runner with explicit (args,cursor). Threads L # through selected rows while the ECS transaction journals World changes. # Failure retains returned capture but discards row outputs. Bypasses runtime # registration checks; ordinary callers use define/run or App capture add. def runner(~S:Data,~C:Type,~R:Type,~E:Data,~L:Type,~Ops:Type -> Type,~A:Data,~U:Data,~Out:Data,~query:Decl.Declaration,Ops(Q.Frame)>,~body:@-H:Type -> @-caps:Ops(H) -> L -> A -> H -> H & (L & (T.Outcome & Out)),world:W.World,capture:L,args:A & Maybe<&2,Tick.Tick>) -> Local.Outcome,L,Q.Error,List<&2,Out>>: match args: case (args,cursor):finished(~S,~C,~R,~E,~L,~U,~Out,Fold.each_since(~S,~C,~R,~E,~L,~U,~Out,~Ops,~A,~plan(~S,~C,~R,~E,~L,~Ops,~A,~U,~Out,~query,~body),~body,args,cursor,capture,world)) 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=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/capture_query.bend&name=each_since https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/change_tick.bend&name=Tick https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/compose.bend&name=Error 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/local.bend&name=Outcome https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_capture_query.bend&name=finished https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_capture_query.bend&name=plan 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/transaction.bend&name=Outcome https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/world.bend&name=World