def fields

bendvy-ecs-core@0.1.0.4 · ordinary_app_event_family_reader.bend:27

import bendvy-ecs-core@0.1.0.4/ordinary_app_event_family_reader.bend as OrdinaryAppEventFamilyReader
import Base
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/system.bend as Sys
import bendvy-ecs-core@0.1.0.4/event_runtime.bend as Ev
import bendvy-ecs-core@0.1.0.4/ordinary_event_declaration.bend as Event
import bendvy-ecs-core@0.1.0.4/ordinary_app_event.bend as OrdinaryEvent
import bendvy-ecs-core@0.1.0.4/ordinary_app_registration_fields.bend as Records
import bendvy-ecs-core@0.1.0.4/ordinary_query_declaration.bend as Query

27# Advanced App metadata projection: return this owner with its registration
28# fields and event-read clause. The reported Registry cursor is not a read of
29# the event stream's position. Debug collection does not deliver, advance or
30# trim events; the actual reader and Registry are returned inside the owner.
31def fields(~S:Data,~C:Type,~R:Type,~P:Data,~E:Data,~Reader:Type,~A:Type,~Error:Data,~Out:Type,~runner:W.World<S,C,R,P> -> Ev.Input<E,A> -> Sys.Outcome<W.World<S,C,R,P>,Error,Out>,owner:Owner<S,E,Reader,Sys.Registry<S,C,R,P,Ev.Input<E,A>,Error,Out,runner>>) -> Owner<S,E,Reader,Sys.Registry<S,C,R,P,Ev.Input<E,A>,Error,Out,runner>> & List<&2,Records.Fields<S>>:
32  match owner:
33    case Owner{Event.Declaration{Event.Domain{+key},+mode},reader,Sys.Registry{+namespace,+id,+name,+access,+cursor}}:(Owner{Event.Declaration{Event.Domain{key},mode},reader,Sys.Registry{namespace,id,name,access,cursor}},[Records.Fields{namespace,id,name,access,cursor,key,[Query.Clause{key,OrdinaryEvent.query_mode(mode)}],Records.EventKind{}}])

Uses (14)

Used by (3)