~/bend-docscommunity

ordinary_query_builder.bend checks

raw source on the hub · import bendvy-ecs-core@0.1.0.2/ordinary_query_builder.bend as Ordinary_query_builder

12 imports
import Base
import ./ordinary_query_observable.bend as O
import ./ordinary_query_declaration.bend as N
import ./ordinary_component_binding.bend as B
import ./inspector_query_projection.bend as P
import ./inspector_query.bend as IQ
import ./inspector.bend as I
import ./compose.bend as Q
import ./component.bend as C
import ./column.bend as Col
import ./capabilities.bend as Cap
import ./internal/query_read_session.bend as Session

Types

type Builder source · line 22 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-H:Type -> @-G:Type -> @-V:Data -> Type

Supported ordinary setup for read/optional/pair queries. Each binding defines both ordinary authority and the compact read recipe; finish returns the existing ordinary Declaration. Other forms and mixed composition use O.pair after finish. The concrete Store remains indexed until composition finishes; gameplay keeps the existing opaque owner and query interfaces. Setup carrier for read/optional/pair declarations and their detached inspection recipe. It owns no runtime world or payload; use finish to obtain the ordinary observable declaration accepted by registration.

Templates

template ordinary source · line 26 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-H:Type -> @-G:Type -> @-V:Data -> @builder:Builder<S, Store, R, E, H, G, V> -> 0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_observable.Declaration<S, H, G, 0xb2b0f04555daca474f0f77d0966945c9/inspector.Frame<S, Store, R, E>, V>

Consume the setup builder to obtain its ordinary observable declaration. No query executes; use finish to retain the prepared read enumeration path.

template session source · line 29 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-H:Type -> @-G:Type -> @-V:Data -> @builder:Builder<S, Store, R, E, H, G, V> -> 0xb2b0f04555daca474f0f77d0966945c9/inspector_query_projection.DeclaredSelection<0xb2b0f04555daca474f0f77d0966945c9/internal/query_read_session.Owner<S, Store>, S, V>

template read source · line 36 · raw

@-S:Data -> @-Store:Type -> @-Rest:Type -> @-Payload:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, Payload>)) -> @-put:(@_:Rest -> @_:0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, Payload> -> Store) -> @-view:(@_:Payload -> Pair(Payload, V)) -> @-R:Type -> @-E:Data -> @-binding:0xb2b0f04555daca474f0f77d0966945c9/ordinary_component_binding.Binding<S, Store, Rest, Payload, V, Token, take, put, view> -> Builder<S, Store, R, E, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, Store, R, E>, 0xb2b0f04555daca474f0f77d0966945c9/capabilities.Read<0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, Store, R, E>, V>, 0xb2b0f04555daca474f0f77d0966945c9/component.Access<V>>

Build a required component read and matching detached inspection recipe from one trusted binding. view preserves Payload and exposes Data V only. Operational reads return Found/ComponentAbsent/MissingEntity; declaration creation neither acquires a world nor advances system visibility.

template optional source · line 42 · raw

@-S:Data -> @-Store:Type -> @-Rest:Type -> @-Payload:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, Payload>)) -> @-put:(@_:Rest -> @_:0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, Payload> -> Store) -> @-view:(@_:Payload -> Pair(Payload, V)) -> @-R:Type -> @-E:Data -> @-binding:0xb2b0f04555daca474f0f77d0966945c9/ordinary_component_binding.Binding<S, Store, Rest, Payload, V, Token, take, put, view> -> Builder<S, Store, R, E, 0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, Store, R, E>, 0xb2b0f04555daca474f0f77d0966945c9/capabilities.Read<0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, Store, R, E>, V>, 0xb2b0f04555daca474f0f77d0966945c9/component.Access<V>>

Build an optional read: a missing component does not exclude a live row. Access results retain ComponentAbsent; stale/foreign handles remain MissingEntity. The projection preserves affine Payload while exposing V.

template pair source · line 49 · raw

@-S:Data -> @-Store:Type -> @-Resource:Type -> @-E:Data -> @-H:Type -> @-L:Type -> @-R:Type -> @-LV:Data -> @-RV:Data -> @-left:Builder<S, Store, Resource, E, H, L, LV> -> @-right:Builder<S, Store, Resource, E, H, R, RV> -> Builder<S, Store, Resource, E, H, Pair(L, R), 0xb2b0f04555daca474f0f77d0966945c9/inspector_query_projection.Product<LV, RV>>

Combine setup builders with conjunctive row selection and nested grants (L & R); detached results use Product<LV,RV>. Both builders must share schema, storage and owner. Nest pairs for larger shapes; no fixed arity limit is introduced. No row traversal occurs during construction.

template finish source · line 59 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-H:Type -> @-G:Type -> @-V:Data -> @-builder:Builder<S, Store, R, E, H, G, V> -> 0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_observable.Declaration<S, H, G, 0xb2b0f04555daca474f0f77d0966945c9/inspector.Frame<S, Store, R, E>, V>

Unsupported declarations remain ordinary O.Declaration values. Composing one with finish(builder) through O.pair retains the complete opaque evaluator. Produce an ordinary observable declaration with prepared read enumeration. Supports this builder's read/optional/pair forms; mix other supported forms afterward using ordinary-query-observable.pair. Preserves typed operational grants and detached inspection; this call does not execute either. Example: test-fixtures/connected-performance/sparse-motion64/consumer/s-perf/ canonical-api-v1/sparse-runtime-v1/motion-logical.bend, declaration().

template replace_operational source · line 65 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-H:Type -> @-Old:Type -> @-New:Type -> @-V:Data -> @-operation:0xb2b0f04555daca474f0f77d0966945c9/ordinary_query_declaration.Declaration<S, H, New> -> @-builder:Builder<S, Store, R, E, H, Old, V> -> Builder<S, Store, R, E, H, New, V>

Trusted advanced adapter replacing the builder's operational declaration while retaining its inspection and read-enumeration recipes. Caller must preserve their intended relationship; no semantic equivalence is checked. Does not grant inspection the replacement's write operations.