ordinary_query_observable.bend checks
raw source on the hub · import bendvy-ecs-core@0.1.0.5/ordinary_query_observable.bend as Ordinary_query_observable
14 imports
import Base import ./ordinary_query_declaration.bend as N import ./ordinary_component_binding.bend as B import ./ordinary_declaration.bend as Identity import ./ordinary_query_selections.bend as F import ./inspector_query_projection.bend as P import ./inspector_query_families.bend as Families import ./inspector_query_world.bend as IW import ./inspector_query.bend as IQ import ./inspector.bend as I import ./compose.bend as Q import ./column.bend as Col import ./component.bend as C import ./capabilities.bend as Cap
Types
type Declaration source · line 22 · raw
@-S:Data -> @-H:Type -> @-G:Type -> @-IH:Type -> @-V:Data -> Type
One ordinary declaration delays both lowerings from the same component binding. Operational transaction authority never enters the detached read-only query. One query declaration supplies operational grants and detached inspection from the same bindings. Declaration uses the ordinary evaluator; the PreparedDeclaration variant also supplies an enumeration callback. Raw constructors are trusted adapters. Payload owners never enter detached V.
Declaration@-S:Data -> @-H:Type -> @-G:Type -> @-IH:Type -> @-V:Data -> @operational:(@_:Unit -> 0x2a0aaf4f2cb3f416a9b91fd887916a5d/ordinary_query_declaration.Declaration<S, H, G>) -> @inspection:(@_:Unit -> 0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector_query_projection.DeclaredSelection<IH, S, V>) -> Declaration<S, H, G, IH, V>
PreparedDeclaration@-S:Data -> @-H:Type -> @-G:Type -> @-IH:Type -> @-V:Data -> @operational:(@_:Unit -> 0x2a0aaf4f2cb3f416a9b91fd887916a5d/ordinary_query_declaration.Declaration<S, H, G>) -> @inspection:(@_:Unit -> 0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector_query_projection.DeclaredSelection<IH, S, V>) -> @enumerate:(@_:IH -> Pair(IH, List<&2, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector_query.ProjectedRow<S, V>>)) -> Declaration<S, H, G, IH, V>
Templates
template operational source · line 27 · raw
@-S:Data -> @-H:Type -> @-G:Type -> @-IH:Type -> @-V:Data -> @declaration:Declaration<S, H, G, IH, V> -> 0x2a0aaf4f2cb3f416a9b91fd887916a5d/ordinary_query_declaration.Declaration<S, H, G>
Consume the observable declaration and obtain its typed operational query. Does not enumerate rows or run a body; H remains the operational owner type.
template inspection source · line 33 · raw
@-S:Data -> @-H:Type -> @-G:Type -> @-IH:Type -> @-V:Data -> @declaration:Declaration<S, H, G, IH, V> -> 0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector_query_projection.DeclaredSelection<IH, S, V>
Consume the declaration and obtain its detached read-only selection recipe. IH is separate from operational H; no write grant is transferred to inspection.
template clauses source · line 39 · raw
@-S:Data -> @-H:Type -> @-G:Type -> @-IH:Type -> @-V:Data -> @declaration:Declaration<S, H, G, IH, V> -> List<&2, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/ordinary_query_declaration.Clause<S>>
Return declaration-derived query clauses for access/debug descriptions. Consumes this declaration value, without inspecting or modifying a world.
template read source · line 46 · raw
@-S:Data -> @-Store:Type -> @-Rest:Type -> @-Payload:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/column.Column<S, Payload>)) -> @-put:(@_:Rest -> @_:0x2a0aaf4f2cb3f416a9b91fd887916a5d/column.Column<S, Payload> -> Store) -> @-view:(@_:Payload -> Pair(Payload, V)) -> @-R:Type -> @-E:Data -> @-binding:0x2a0aaf4f2cb3f416a9b91fd887916a5d/ordinary_component_binding.Binding<S, Store, Rest, Payload, V, Token, take, put, view> -> Declaration<S, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/compose.Frame<S, Store, R, E>, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/capabilities.Read<0x2a0aaf4f2cb3f416a9b91fd887916a5d/compose.Frame<S, Store, R, E>, V>, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector.Frame<S, Store, R, E>, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/component.Access<V>>
Declare required component read access and the matching detached inspection. The trusted binding fixes schema and storage lenses. view consumes/returns Payload and exposes Data V; operational results are Found/ComponentAbsent/ MissingEntity, including stale/foreign rejection. No row is read at setup.
template write source · line 53 · raw
@-S:Data -> @-Store:Type -> @-Rest:Type -> @-Payload:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/column.Column<S, Payload>)) -> @-put:(@_:Rest -> @_:0x2a0aaf4f2cb3f416a9b91fd887916a5d/column.Column<S, Payload> -> Store) -> @-view:(@_:Payload -> Pair(Payload, V)) -> @-R:Type -> @-E:Data -> @-binding:0x2a0aaf4f2cb3f416a9b91fd887916a5d/ordinary_component_binding.Binding<S, Store, Rest, Payload, V, Token, take, put, view> -> Declaration<S, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/compose.Frame<S, Store, R, E>, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/capabilities.Write<0x2a0aaf4f2cb3f416a9b91fd887916a5d/compose.Frame<S, Store, R, E>, Payload, V>, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector.Frame<S, Store, R, E>, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/component.Access<V>>
Declare required component read/write access with read-only inspection. Writes consume replacement Payload; failed sets record an error for enclosing Compose execution/rollback and do not return rejected input through the grant. Detached inspection exposes only V and never authorizes a write.
template optional source · line 59 · raw
@-S:Data -> @-Store:Type -> @-Rest:Type -> @-Payload:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/column.Column<S, Payload>)) -> @-put:(@_:Rest -> @_:0x2a0aaf4f2cb3f416a9b91fd887916a5d/column.Column<S, Payload> -> Store) -> @-view:(@_:Payload -> Pair(Payload, V)) -> @-R:Type -> @-E:Data -> @-binding:0x2a0aaf4f2cb3f416a9b91fd887916a5d/ordinary_component_binding.Binding<S, Store, Rest, Payload, V, Token, take, put, view> -> Declaration<S, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/compose.Frame<S, Store, R, E>, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/capabilities.Read<0x2a0aaf4f2cb3f416a9b91fd887916a5d/compose.Frame<S, Store, R, E>, V>, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector.Frame<S, Store, R, E>, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/component.Access<V>>
Declare read access without requiring component presence on a live row. Operational and detached selections preserve absence explicitly; stale/foreign handles remain MissingEntity rather than matching as optional live rows.
template with_component source · line 64 · raw
@-S:Data -> @-Store:Type -> @-Rest:Type -> @-Payload:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/column.Column<S, Payload>)) -> @-put:(@_:Rest -> @_:0x2a0aaf4f2cb3f416a9b91fd887916a5d/column.Column<S, Payload> -> Store) -> @-view:(@_:Payload -> Pair(Payload, V)) -> @-R:Type -> @-E:Data -> @-binding:0x2a0aaf4f2cb3f416a9b91fd887916a5d/ordinary_component_binding.Binding<S, Store, Rest, Payload, V, Token, take, put, view> -> Declaration<S, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/compose.Frame<S, Store, R, E>, Unit, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector.Frame<S, Store, R, E>, Unit>
Require presence without granting payload operations; detached projection contributes Unit. Combine with pair for additional independently granted data.
template without_component source · line 69 · raw
@-S:Data -> @-Store:Type -> @-Rest:Type -> @-Payload:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/column.Column<S, Payload>)) -> @-put:(@_:Rest -> @_:0x2a0aaf4f2cb3f416a9b91fd887916a5d/column.Column<S, Payload> -> Store) -> @-view:(@_:Payload -> Pair(Payload, V)) -> @-R:Type -> @-E:Data -> @-binding:0x2a0aaf4f2cb3f416a9b91fd887916a5d/ordinary_component_binding.Binding<S, Store, Rest, Payload, V, Token, take, put, view> -> Declaration<S, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/compose.Frame<S, Store, R, E>, Unit, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector.Frame<S, Store, R, E>, Unit>
Require absence without granting payload operations; detached projection contributes Unit. Structural membership changes at explicit barriers.
template added source · line 75 · raw
@-S:Data -> @-Store:Type -> @-Rest:Type -> @-Payload:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/column.Column<S, Payload>)) -> @-put:(@_:Rest -> @_:0x2a0aaf4f2cb3f416a9b91fd887916a5d/column.Column<S, Payload> -> Store) -> @-view:(@_:Payload -> Pair(Payload, V)) -> @-R:Type -> @-E:Data -> @-binding:0x2a0aaf4f2cb3f416a9b91fd887916a5d/ordinary_component_binding.Binding<S, Store, Rest, Payload, V, Token, take, put, view> -> Declaration<S, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/compose.Frame<S, Store, R, E>, Unit, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector.Frame<S, Store, R, E>, Unit>
Add a lifecycle filter without payload access; inspection uses its supplied cursor and operational execution uses the registered system cursor. Merely constructing or inspecting this declaration advances neither system cursor.
template changed source · line 81 · raw
@-S:Data -> @-Store:Type -> @-Rest:Type -> @-Payload:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/column.Column<S, Payload>)) -> @-put:(@_:Rest -> @_:0x2a0aaf4f2cb3f416a9b91fd887916a5d/column.Column<S, Payload> -> Store) -> @-view:(@_:Payload -> Pair(Payload, V)) -> @-R:Type -> @-E:Data -> @-binding:0x2a0aaf4f2cb3f416a9b91fd887916a5d/ordinary_component_binding.Binding<S, Store, Rest, Payload, V, Token, take, put, view> -> Declaration<S, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/compose.Frame<S, Store, R, E>, Unit, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector.Frame<S, Store, R, E>, Unit>
Add a changed-since-cursor filter without payload access. The operational and Inspector owners retain separate cursor authority; declaration construction and detached inspection do not consume registered system visibility.
template pair source · line 88 · raw
@-S:Data -> @-H:Type -> @-L:Type -> @-R:Type -> @-IH:Type -> @-LV:Data -> @-RV:Data -> @-left:Declaration<S, H, L, IH, LV> -> @-right:Declaration<S, H, R, IH, RV> -> Declaration<S, H, Pair(L, R), IH, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector_query_projection.Product<LV, RV>>
Compose conjunctive selections from the same schema and owner types. Operational grants retain (L & R), detached values Product<LV,RV>, and clause order is left then right. Nest pairs for arbitrary heterogeneous shapes. Example: examples/scheduled-health/registration.bend, query().
template prepared_query source · line 90 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-V:Data -> @-selection:0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector_query_projection.DeclaredSelection<0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector.Frame<S, Store, R, E>, S, V> -> @enumerate:(@_:0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector.Frame<S, Store, R, E> -> Pair(0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector.Frame<S, Store, R, E>, List<&2, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector_query.ProjectedRow<S, V>>)) -> 0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector_query.ComposedReadQuery<0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector.Frame<S, Store, R, E>, S, V>
template inspect_query_value source · line 92 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-H:Type -> @-G:Type -> @-V:Data -> @-declaration:Declaration<S, H, G, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector.Frame<S, Store, R, E>, V> -> @kind:Declaration<S, H, G, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector.Frame<S, Store, R, E>, V> -> 0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector_query.ComposedReadQuery<0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector.Frame<S, Store, R, E>, S, V>
template inspect_query source · line 100 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-H:Type -> @-G:Type -> @-V:Data -> @-declaration:Declaration<S, H, G, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector.Frame<S, Store, R, E>, V> -> 0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector_query.ComposedReadQuery<0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector.Frame<S, Store, R, E>, S, V>
Lower this observable declaration into an Inspector composed read query. Preserves prepared enumeration when present; supplies no write operations. Run it with the public Inspector owner, not a registered system owner, so detached observations do not consume system cursors or event retention.
template write_displayed source · line 106 · raw
@-S:Data -> @-Store:Type -> @-Rest:Type -> @-Payload:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/column.Column<S, Payload>)) -> @-put:(@_:Rest -> @_:0x2a0aaf4f2cb3f416a9b91fd887916a5d/column.Column<S, Payload> -> Store) -> @-view:(@_:Payload -> Pair(Payload, V)) -> @-R:Type -> @-E:Data -> @-display:(@_:V -> String) -> @-binding:0x2a0aaf4f2cb3f416a9b91fd887916a5d/ordinary_component_binding.Binding<S, Store, Rest, Payload, V, Token, take, put, view> -> Declaration<S, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/compose.Frame<S, Store, R, E>, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/capabilities.Write<0x2a0aaf4f2cb3f416a9b91fd887916a5d/compose.Frame<S, Store, R, E>, Payload, V>, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/inspector.Frame<S, Store, R, E>, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/component.Access<V>>
Declare write access plus a formatter for detached Data V in enabled debug. Formatter receives no Payload owner; transaction/refusal semantics match write. Inspection remains read-only even though the operational grant permits writes.