capture_query.bend checks
raw source on the hub · import bendvy-ecs-core@0.1.0.7/capture_query.bend as Capture_query
6 imports
import Base import ./change_tick.bend as Tick import ./world.bend as W import ./compose.bend as Q import ./transaction.bend as T import ./commands.bend as Cmd
Types
type Executed source · line 10 · raw
@World:Type -> @L:Type -> @Error:Data -> @Out:Data -> Type
Ordinary query selection and access stay in Q.Frame. The affine accumulator is outside the transaction journal and survives each entered row, including error.
Executed@World:Type -> @L:Type -> @Error:Data -> @Out:Data -> @world:World -> @capture:L -> @outcome:0x7e321819d0ff210531780719c7674cef/transaction.Outcome<Error> -> @values:List<&2, Out> -> Executed<World, L, Error, Out>
Templates
template prepend source · line 12 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-U:Data -> @-Out:Data -> @value:Out -> @observed:Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<0x7e321819d0ff210531780719c7674cef/compose.Error<U>>, List<&2, Out>))) -> Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<0x7e321819d0ff210531780719c7674cef/compose.Error<U>>, List<&2, Out>)))
template completed source · line 15 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-U:Data -> @-Out:Data -> @next:(@_:L -> @_:0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E> -> Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<0x7e321819d0ff210531780719c7674cef/compose.Error<U>>, List<&2, Out>)))) -> @capture:L -> @tx:0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E> -> @value:Out -> @status:0x7e321819d0ff210531780719c7674cef/transaction.Outcome<0x7e321819d0ff210531780719c7674cef/compose.Error<U>> -> Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<0x7e321819d0ff210531780719c7674cef/compose.Error<U>>, List<&2, Out>)))
template body_returned source · line 19 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-U:Data -> @-Out:Data -> @next:(@_:L -> @_:0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E> -> Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<0x7e321819d0ff210531780719c7674cef/compose.Error<U>>, List<&2, Out>)))) -> @observed:Pair(0x7e321819d0ff210531780719c7674cef/compose.Frame<S, C, R, E>, Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<U>, Out))) -> Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<0x7e321819d0ff210531780719c7674cef/compose.Error<U>>, List<&2, Out>)))
template selected source · line 22 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-U:Data -> @-Out:Data -> @-Ops:(@_:Type -> Type) -> @-A:Data -> @-plan:0x7e321819d0ff210531780719c7674cef/compose.Plan<S, C, R, E, Ops> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:A -> @_:H -> Pair(H, Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<U>, Out)))) -> @args:A -> @capture:L -> @next:(@_:L -> @_:0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E> -> Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<0x7e321819d0ff210531780719c7674cef/compose.Error<U>>, List<&2, Out>)))) -> @observed:Pair(0x7e321819d0ff210531780719c7674cef/compose.Frame<S, C, R, E>, Bool) -> Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<0x7e321819d0ff210531780719c7674cef/compose.Error<U>>, List<&2, Out>)))
template row_body_returned source · line 26 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-U:Data -> @-Out:Data -> @observed:Pair(0x7e321819d0ff210531780719c7674cef/compose.Frame<S, C, R, E>, Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<U>, Out))) -> Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>, 0x7e321819d0ff210531780719c7674cef/compose.RowResult<U, Out>))
template selected_row source · line 29 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-U:Data -> @-Out:Data -> @-Ops:(@_:Type -> Type) -> @-A:Data -> @-plan:0x7e321819d0ff210531780719c7674cef/compose.Plan<S, C, R, E, Ops> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:A -> @_:H -> Pair(H, Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<U>, Out)))) -> @args:A -> @capture:L -> @observed:Pair(0x7e321819d0ff210531780719c7674cef/compose.Frame<S, C, R, E>, Bool) -> Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>, 0x7e321819d0ff210531780719c7674cef/compose.RowResult<U, Out>))
template run_handles_acc source · line 35 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-U:Data -> @-Out:Data -> @-Ops:(@_:Type -> Type) -> @-A:Data -> @-plan:0x7e321819d0ff210531780719c7674cef/compose.Plan<S, C, R, E, Ops> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:A -> @_:H -> Pair(H, Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<U>, Out)))) -> @handles:List<&2, 0x7e321819d0ff210531780719c7674cef/world.Handle<S>> -> @+args:A -> @+cursor:Maybe<&2, 0x7e321819d0ff210531780719c7674cef/change_tick.Tick> -> @values:List<&2, Out> -> @observed:Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>, 0x7e321819d0ff210531780719c7674cef/compose.RowResult<U, Out>)) -> Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<0x7e321819d0ff210531780719c7674cef/compose.Error<U>>, List<&2, Out>)))
Keep the affine capture returned by each entered row, including a failed row. Only the Data outputs are accumulated/reversed; no row continuation is retained.
template run_handles source · line 42 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-U:Data -> @-Out:Data -> @-Ops:(@_:Type -> Type) -> @-A:Data -> @-plan:0x7e321819d0ff210531780719c7674cef/compose.Plan<S, C, R, E, Ops> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:A -> @_:H -> Pair(H, Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<U>, Out)))) -> @handles:List<&2, 0x7e321819d0ff210531780719c7674cef/world.Handle<S>> -> @args:A -> @cursor:Maybe<&2, 0x7e321819d0ff210531780719c7674cef/change_tick.Tick> -> @capture:L -> @tx:0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E> -> Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<0x7e321819d0ff210531780719c7674cef/compose.Error<U>>, List<&2, Out>)))
template returned source · line 44 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-U:Data -> @-Out:Data -> @capture:L -> @values:List<&2, Out> -> @result:0x7e321819d0ff210531780719c7674cef/transaction.Returned<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, 0x7e321819d0ff210531780719c7674cef/compose.Error<U>> -> Executed<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, L, 0x7e321819d0ff210531780719c7674cef/compose.Error<U>, Out>
template finished source · line 48 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-U:Data -> @-Out:Data -> @-finish:(@_:0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E> -> @_:0x7e321819d0ff210531780719c7674cef/transaction.Outcome<0x7e321819d0ff210531780719c7674cef/compose.Error<U>> -> 0x7e321819d0ff210531780719c7674cef/transaction.Returned<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, 0x7e321819d0ff210531780719c7674cef/compose.Error<U>>) -> @observed:Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<0x7e321819d0ff210531780719c7674cef/compose.Error<U>>, List<&2, Out>))) -> Executed<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, L, 0x7e321819d0ff210531780719c7674cef/compose.Error<U>, Out>
template scope_finished source · line 51 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-U:Data -> @-Out:Data -> @owned:Bool -> @result:Executed<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, L, 0x7e321819d0ff210531780719c7674cef/compose.Error<U>, Out> -> Executed<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, L, 0x7e321819d0ff210531780719c7674cef/compose.Error<U>, Out>
template reserved_inner source · line 54 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-U:Data -> @-Out:Data -> @-Ops:(@_:Type -> Type) -> @-A:Data -> @-plan:0x7e321819d0ff210531780719c7674cef/compose.Plan<S, C, R, E, Ops> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:A -> @_:H -> Pair(H, Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<U>, Out)))) -> @-finish:(@_:0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E> -> @_:0x7e321819d0ff210531780719c7674cef/transaction.Outcome<0x7e321819d0ff210531780719c7674cef/compose.Error<U>> -> 0x7e321819d0ff210531780719c7674cef/transaction.Returned<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, 0x7e321819d0ff210531780719c7674cef/compose.Error<U>>) -> @args:A -> @cursor:Maybe<&2, 0x7e321819d0ff210531780719c7674cef/change_tick.Tick> -> @capture:L -> @result:Pair(0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, List<&2, 0x7e321819d0ff210531780719c7674cef/world.Handle<S>>) -> Executed<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, L, 0x7e321819d0ff210531780719c7674cef/compose.Error<U>, Out>
template reserved_scoped source · line 57 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-U:Data -> @-Out:Data -> @-Ops:(@_:Type -> Type) -> @-A:Data -> @-plan:0x7e321819d0ff210531780719c7674cef/compose.Plan<S, C, R, E, Ops> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:A -> @_:H -> Pair(H, Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<U>, Out)))) -> @-finish:(@_:0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E> -> @_:0x7e321819d0ff210531780719c7674cef/transaction.Outcome<0x7e321819d0ff210531780719c7674cef/compose.Error<U>> -> 0x7e321819d0ff210531780719c7674cef/transaction.Returned<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, 0x7e321819d0ff210531780719c7674cef/compose.Error<U>>) -> @args:A -> @cursor:Maybe<&2, 0x7e321819d0ff210531780719c7674cef/change_tick.Tick> -> @capture:L -> @handles:List<&2, 0x7e321819d0ff210531780719c7674cef/world.Handle<S>> -> @admitted:Pair(0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, Bool) -> Executed<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, L, 0x7e321819d0ff210531780719c7674cef/compose.Error<U>, Out>
template reserved source · line 60 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-U:Data -> @-Out:Data -> @-Ops:(@_:Type -> Type) -> @-A:Data -> @-plan:0x7e321819d0ff210531780719c7674cef/compose.Plan<S, C, R, E, Ops> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:A -> @_:H -> Pair(H, Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<U>, Out)))) -> @-finish:(@_:0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E> -> @_:0x7e321819d0ff210531780719c7674cef/transaction.Outcome<0x7e321819d0ff210531780719c7674cef/compose.Error<U>> -> 0x7e321819d0ff210531780719c7674cef/transaction.Returned<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, 0x7e321819d0ff210531780719c7674cef/compose.Error<U>>) -> @args:A -> @cursor:Maybe<&2, 0x7e321819d0ff210531780719c7674cef/change_tick.Tick> -> @capture:L -> @result:Pair(0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, List<&2, 0x7e321819d0ff210531780719c7674cef/world.Handle<S>>) -> Executed<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, L, 0x7e321819d0ff210531780719c7674cef/compose.Error<U>, Out>
template each_since_with source · line 64 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-U:Data -> @-Out:Data -> @-Ops:(@_:Type -> Type) -> @-A:Data -> @-plan:0x7e321819d0ff210531780719c7674cef/compose.Plan<S, C, R, E, Ops> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:A -> @_:H -> Pair(H, Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<U>, Out)))) -> @-finish:(@_:0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E> -> @_:0x7e321819d0ff210531780719c7674cef/transaction.Outcome<0x7e321819d0ff210531780719c7674cef/compose.Error<U>> -> 0x7e321819d0ff210531780719c7674cef/transaction.Returned<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, 0x7e321819d0ff210531780719c7674cef/compose.Error<U>>) -> @args:A -> @cursor:Maybe<&2, 0x7e321819d0ff210531780719c7674cef/change_tick.Tick> -> @capture:L -> @world:0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E> -> Executed<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, L, 0x7e321819d0ff210531780719c7674cef/compose.Error<U>, Out>
template each_since source · line 66 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-L:Type -> @-U:Data -> @-Out:Data -> @-Ops:(@_:Type -> Type) -> @-A:Data -> @-plan:0x7e321819d0ff210531780719c7674cef/compose.Plan<S, C, R, E, Ops> -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:L -> @_:A -> @_:H -> Pair(H, Pair(L, Pair(0x7e321819d0ff210531780719c7674cef/transaction.Outcome<U>, Out)))) -> @args:A -> @cursor:Maybe<&2, 0x7e321819d0ff210531780719c7674cef/change_tick.Tick> -> @capture:L -> @world:0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E> -> Executed<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, L, 0x7e321819d0ff210531780719c7674cef/compose.Error<U>, Out>