~/bend-docscommunity

inspector_query_projection.bend checks

raw source on the hub · import bendvy-ecs-core@0.1.0.6/inspector_query_projection.bend as Inspector_query_projection

7 imports
import Base
import ./change_tick.bend as Tick
import inspector.bend as I
import world.bend as W
import component.bend as C
import column.bend as Col
import capabilities.bend as Cap

Types

type Row source · line 11 · raw

@S:Data -> @V:Data -> Data

Detached single-family Inspector row with entity handle and Access plus lifecycle flags. No live component owner is transferred into this Data value.

type Selection source · line 15 · raw

Data

Read selection: Required presence, Optional membership, or Added/Changed presence plus lifecycle filter relative to the Inspector observation cursor.

type DeclaredSelection source · line 62 · raw

@-H:Type -> @-S:Data -> @-V:Data -> Type

Trusted closed declarations; runtime H is consumed and returned, never copied. This composition kernel grants no Frame, family, lifecycle, write or command. Trusted closed membership/projection pair threading H for one target. The projection is used after a match by canonical query grants; raw callbacks must preserve their intended relationship. No writes are granted by this kernel.

type Product source · line 66 · raw

@A:Data -> @B:Data -> Data

Detached heterogeneous projection pair retaining left/right value shape. Nest for larger queries without imposing a fixed arity ceiling.

type Predicate source · line 70 · raw

@-H:Type -> @-S:Data -> Type

Trusted target predicate threading opaque H. Contains no Data projection or implicit World validity proof; compose it with the canonical query route.

Templates

template present source · line 21 · raw

@-V:Data -> @value:0x14a72e1c180a5ab1f8a056d43822425c/component.Access<V> -> Bool

template accepts source · line 25 · raw

@-V:Data -> @selection:Selection -> @value:0x14a72e1c180a5ab1f8a056d43822425c/inspector.Value<V> -> Bool

template included source · line 31 · raw

@-S:Data -> @-V:Data -> @include:Bool -> @row:Row<S, V> -> @rows:List<&2, Row<S, V>> -> List<&2, Row<S, V>>

template read_row source · line 36 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-V:Data -> @-selection:Selection -> @target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> @rows:List<&2, Row<S, V>> -> @continue:(@_:0x14a72e1c180a5ab1f8a056d43822425c/inspector.Frame<S, Store, R, E> -> @_:List<&2, Row<S, V>> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/inspector.Frame<S, Store, R, E>, List<&2, Row<S, V>>)) -> @observed:Pair(0x14a72e1c180a5ab1f8a056d43822425c/inspector.Frame<S, Store, R, E>, 0x14a72e1c180a5ab1f8a056d43822425c/inspector.Value<V>) -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/inspector.Frame<S, Store, R, E>, List<&2, Row<S, V>>)

template read_rows source · line 40 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Rest:Type -> @-C:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0x14a72e1c180a5ab1f8a056d43822425c/column.Column<S, C>)) -> @-put:(@_:Rest -> @_:0x14a72e1c180a5ab1f8a056d43822425c/column.Column<S, C> -> Store) -> @-project:(@_:C -> Pair(C, V)) -> @-family:0x14a72e1c180a5ab1f8a056d43822425c/component.Family<S, Store, Rest, C, V, Token, take, put, project> -> @-selection:Selection -> @handles:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S>> -> @frame:0x14a72e1c180a5ab1f8a056d43822425c/inspector.Frame<S, Store, R, E> -> @rows:List<&2, Row<S, V>> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/inspector.Frame<S, Store, R, E>, List<&2, Row<S, V>>)

template scanned source · line 45 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Rest:Type -> @-C:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0x14a72e1c180a5ab1f8a056d43822425c/column.Column<S, C>)) -> @-put:(@_:Rest -> @_:0x14a72e1c180a5ab1f8a056d43822425c/column.Column<S, C> -> Store) -> @-project:(@_:C -> Pair(C, V)) -> @-family:0x14a72e1c180a5ab1f8a056d43822425c/component.Family<S, Store, Rest, C, V, Token, take, put, project> -> @-selection:Selection -> @cursor:Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/change_tick.Tick> -> @observed:Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store, R, E>, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S>>) -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/inspector.Frame<S, Store, R, E>, List<&2, Row<S, V>>)

template scan source · line 48 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Rest:Type -> @-C:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0x14a72e1c180a5ab1f8a056d43822425c/column.Column<S, C>)) -> @-put:(@_:Rest -> @_:0x14a72e1c180a5ab1f8a056d43822425c/column.Column<S, C> -> Store) -> @-project:(@_:C -> Pair(C, V)) -> @-family:0x14a72e1c180a5ab1f8a056d43822425c/component.Family<S, Store, Rest, C, V, Token, take, put, project> -> @-selection:Selection -> @frame:0x14a72e1c180a5ab1f8a056d43822425c/inspector.Frame<S, Store, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/inspector.Frame<S, Store, R, E>, List<&2, Row<S, V>>)

template read_query source · line 54 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Rest:Type -> @-C:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0x14a72e1c180a5ab1f8a056d43822425c/column.Column<S, C>)) -> @-put:(@_:Rest -> @_:0x14a72e1c180a5ab1f8a056d43822425c/column.Column<S, C> -> Store) -> @-project:(@_:C -> Pair(C, V)) -> @-family:0x14a72e1c180a5ab1f8a056d43822425c/component.Family<S, Store, Rest, C, V, Token, take, put, project> -> @-selection:Selection -> 0x14a72e1c180a5ab1f8a056d43822425c/capabilities.ValueRead<0x14a72e1c180a5ab1f8a056d43822425c/inspector.Frame<S, Store, R, E>, List<&2, Row<S, V>>>

Trusted read-only enumeration grant for the specified family/selection. Uses live World handles; projection must preserve affine component owners. Constructs operations without scanning or consuming any system cursor.

template predicate_field source · line 74 · raw

@-H:Type -> @-S:Data -> @value:Predicate<H, S> -> @_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)

Advanced projection extracting the closed predicate operation without invoking it or validating a World/target.

template matches_field source · line 79 · raw

@-H:Type -> @-S:Data -> @-V:Data -> @value:DeclaredSelection<H, S, V> -> @_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)

Advanced setup projection extracting membership; this does not execute the predicate or grant additional authority.

template project_field source · line 84 · raw

@-H:Type -> @-S:Data -> @-V:Data -> @value:DeclaredSelection<H, S, V> -> @_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, V)

Advanced setup projection extracting detached projection. Canonical callers validate/match targets first; raw extraction adds no such validation.

template yes source · line 87 · raw

@-H:Type -> @-S:Data -> @owner:H -> @target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)

template empty_value source · line 89 · raw

@-H:Type -> @-S:Data -> @owner:H -> @target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Unit)

template empty source · line 93 · raw

@-H:Type -> @-S:Data -> DeclaredSelection<H, S, Unit>

Create an unconditional Unit-valued selection over opaque H. It is not a live-target proof; World validation comes from the query grant.

template matched_right source · line 95 · raw

@-H:Type -> @-S:Data -> @-right:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)) -> @target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> @observed:Pair(H, Bool) -> Pair(H, Bool)

template pair_matches_target source · line 99 · raw

@-H:Type -> @-S:Data -> @-left:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)) -> @-right:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)) -> @owner:H -> @+target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)

template pair_matches source · line 101 · raw

@-H:Type -> @-S:Data -> @-left:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)) -> @-right:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)) -> @owner:H -> @target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)

template projected_right source · line 103 · raw

@-H:Type -> @-A:Data -> @-B:Data -> @left:A -> @observed:Pair(H, B) -> Pair(H, Product<A, B>)

template projected_left source · line 106 · raw

@-H:Type -> @-S:Data -> @-A:Data -> @-B:Data -> @-right:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, B)) -> @target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> @observed:Pair(H, A) -> Pair(H, Product<A, B>)

template pair_project_target source · line 109 · raw

@-H:Type -> @-S:Data -> @-A:Data -> @-B:Data -> @-left:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, A)) -> @-right:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, B)) -> @owner:H -> @+target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Product<A, B>)

template pair_project source · line 111 · raw

@-H:Type -> @-S:Data -> @-A:Data -> @-B:Data -> @-left:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, A)) -> @-right:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, B)) -> @owner:H -> @target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Product<A, B>)

template pair source · line 116 · raw

@-H:Type -> @-S:Data -> @-A:Data -> @-B:Data -> @-left:DeclaredSelection<H, S, A> -> @-right:DeclaredSelection<H, S, B> -> DeclaredSelection<H, S, Product<A, B>>

Compose two selections with conjunctive membership and Product<A,B> projection, preserving left/right owner threading and short-circuit selection. Does not enumerate targets or change registered cursor state.

template true_predicate source · line 118 · raw

@-H:Type -> @-S:Data -> Predicate<H, S>

template predicate_right source · line 120 · raw

@-H:Type -> @-S:Data -> @right:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)) -> @target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> @observed:Pair(H, Bool) -> Pair(H, Bool)

template predicate_both_target source · line 124 · raw

@-H:Type -> @-S:Data -> @left:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)) -> @right:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)) -> @owner:H -> @+target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)

template predicate_both source · line 126 · raw

@-H:Type -> @-S:Data -> @left:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)) -> @right:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)) -> @owner:H -> @target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)

template both source · line 130 · raw

@-H:Type -> @-S:Data -> @-left:Predicate<H, S> -> @-right:Predicate<H, S> -> Predicate<H, S>

Conjoin two predicates left then right, short-circuiting on false. Retains H even when a predicate rejects; raw callback effects are trusted.

template constrained_target source · line 132 · raw

@-H:Type -> @-S:Data -> @source:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)) -> @predicate:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)) -> @owner:H -> @+target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)

template constrained source · line 134 · raw

@-H:Type -> @-S:Data -> @source:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)) -> @predicate:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)) -> @owner:H -> @target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, Bool)

template constrain source · line 138 · raw

@-H:Type -> @-S:Data -> @-V:Data -> @-source:DeclaredSelection<H, S, V> -> @-predicate:Predicate<H, S> -> DeclaredSelection<H, S, V>

Add a predicate to an existing selection without changing its projected type. Canonical matching short-circuits; projection remains the source route.

template mapped source · line 140 · raw

@-H:Type -> @-A:Data -> @-B:Data -> @name:(@_:A -> B) -> @observed:Pair(H, A) -> Pair(H, B)

template map_project source · line 143 · raw

@-H:Type -> @-S:Data -> @-A:Data -> @-B:Data -> @project:(@_:H -> @_:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, A)) -> @name:(@_:A -> B) -> @owner:H -> @target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(H, B)

template map source · line 147 · raw

@-H:Type -> @-S:Data -> @-A:Data -> @-B:Data -> @-source:DeclaredSelection<H, S, A> -> @-name:(@_:A -> B) -> DeclaredSelection<H, S, B>

Transform detached Data output while retaining the source membership. The pure Data mapper receives no World or affine payload owner.