~/bend-docscommunity

relation_query.bend checks

raw source on the hub · import bendvy-ecs-core@0.1.0.1/relation_query.bend as Relation_query

12 imports
import Base
import ./deferred_command.bend as Deferred
import ./trace_facts.bend as TraceFacts
import entity_key.bend as Key
import relation_types.bend as G
import relation_graph.bend as Graph
import relation_commands.bend as A
import world.bend as W
import transaction.bend as X
import query.bend as Q
import component.bend as Cmp
import capabilities.bend as Cap

Types

type End source · line 16 · raw

Data

Relation requirements have arbitrary declaration length. The application C remains Type; only immutable relation handles/snapshots are Data.

type Requirement source · line 19 · raw

@S:Data -> Data

type Spec source · line 21 · raw

@S:Data -> Data

type Value source · line 23 · raw

@S:Data -> Data

type Cell source · line 27 · raw

@S:Data -> Data

type Row source · line 29 · raw

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

Templates

template read_relation source · line 31 · raw

@-S:Data -> @key:String -> @descriptor:0xf435da9e535b3846d643dad16580e35f/relation_types.Descriptor<S> -> Requirement<S>

template optional_relation source · line 33 · raw

@-S:Data -> @key:String -> @descriptor:0xf435da9e535b3846d643dad16580e35f/relation_types.Descriptor<S> -> Requirement<S>

template with_relation source · line 39 · raw

@-S:Data -> @descriptor:0xf435da9e535b3846d643dad16580e35f/relation_types.Descriptor<S> -> Requirement<S>

template without_relation source · line 41 · raw

@-S:Data -> @descriptor:0xf435da9e535b3846d643dad16580e35f/relation_types.Descriptor<S> -> Requirement<S>

template handles_acc source · line 47 · raw

@-S:Data -> @ids:List<&2, 0xf435da9e535b3846d643dad16580e35f/entity_key.Key> -> @+namespace:U32 -> @acc:List<&2, 0xf435da9e535b3846d643dad16580e35f/world.Handle<S>> -> List<&2, 0xf435da9e535b3846d643dad16580e35f/world.Handle<S>>

template outgoing_value source · line 51 · raw

@-S:Data -> @value:Maybe<&2, 0xf435da9e535b3846d643dad16580e35f/entity_key.Key> -> @namespace:U32 -> Value<S>

template incoming_value source · line 55 · raw

@-S:Data -> @ids:List<&2, 0xf435da9e535b3846d643dad16580e35f/entity_key.Key> -> @namespace:U32 -> Value<S>

template value source · line 59 · raw

@-S:Data -> @graph:0xf435da9e535b3846d643dad16580e35f/relation_types.Graph<S> -> @descriptor:0xf435da9e535b3846d643dad16580e35f/relation_types.Descriptor<S> -> @end:End -> @+namespace:U32 -> @id:0xf435da9e535b3846d643dad16580e35f/entity_key.Key -> Value<S>

template presence source · line 63 · raw

@-S:Data -> @value:Value<S> -> 0xf435da9e535b3846d643dad16580e35f/component.Access<Bool>

template add_cell source · line 67 · raw

@-S:Data -> @project:Bool -> @key:String -> @end:End -> @value:Value<S> -> @cells:List<&2, Cell<S>> -> List<&2, Cell<S>>

template requirements source · line 71 · raw

@-S:Data -> @remaining:List<&2, Requirement<S>> -> @+graph:0xf435da9e535b3846d643dad16580e35f/relation_types.Graph<S> -> @+namespace:U32 -> @+id:0xf435da9e535b3846d643dad16580e35f/entity_key.Key -> @selected:Bool -> @acc:List<&2, Cell<S>> -> Pair(Bool, List<&2, Cell<S>>)

template spec_rows_result source · line 77 · raw

@-S:Data -> @-V:Data -> @observed:Pair(Bool, List<&2, Cell<S>>) -> @handle:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @component:V -> Pair(Bool, Row<S, V>)

template spec_rows source · line 80 · raw

@-S:Data -> @-V:Data -> @spec:Spec<S> -> @graph:0xf435da9e535b3846d643dad16580e35f/relation_types.Graph<S> -> @handle:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @component:V -> Pair(Bool, Row<S, V>)

template graph_read source · line 83 · raw

@-S:Data -> @-C:Type -> @store:0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C> -> Pair(0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, 0xf435da9e535b3846d643dad16580e35f/relation_types.Graph<S>)

template inspect_done source · line 86 · raw

@-S:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-spec:Spec<S> -> @observed:Pair(0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_types.Graph<S>) -> @handle:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @component:V -> @undo:List<&1, @_:0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>> -> 0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>> -> @commands:List<&1, 0xf435da9e535b3846d643dad16580e35f/deferred_command.Command<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>>> -> @events:List<&2, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>> -> @trace:0xf435da9e535b3846d643dad16580e35f/trace_facts.State -> Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, Pair(Bool, Row<S, V>))

template inspect source · line 89 · raw

@-S:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-spec:Spec<S> -> @tx:0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>> -> @handle:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @component:V -> Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, Pair(Bool, Row<S, V>))

template row_get source · line 92 · raw

@-S:Data -> @-V:Data -> @-H:Type -> @+row:Row<S, V> -> @owner:H -> Pair(H, Row<S, V>)

template invoke source · line 94 · raw

@-S:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Out:Data -> @-body:(@-H:Type -> @_:0xf435da9e535b3846d643dad16580e35f/capabilities.ValueRead<H, Row<S, V>> -> @_:H -> Pair(H, Out)) -> @row:Row<S, V> -> @tx:0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>> -> Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, Out)

template output_prepend source · line 96 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Out:Data -> @value:Out -> @observed:Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, List<&2, Out>) -> Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, List<&2, Out>)

template output_join source · line 99 · raw

@-S:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Out:Data -> @observed:Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, Out) -> @next:(@_:0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>> -> Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, List<&2, Out>)) -> Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, List<&2, Out>)

template selected_row source · line 102 · raw

@-S:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Out:Data -> @-body:(@-H:Type -> @_:0xf435da9e535b3846d643dad16580e35f/capabilities.ValueRead<H, Row<S, V>> -> @_:H -> Pair(H, Out)) -> @observed:Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, Pair(Bool, Row<S, V>)) -> @next:(@_:0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>> -> Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, List<&2, Out>)) -> Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, List<&2, Out>)

template component_join source · line 106 · raw

@-S:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Out:Data -> @-spec:Spec<S> -> @-body:(@-H:Type -> @_:0xf435da9e535b3846d643dad16580e35f/capabilities.ValueRead<H, Row<S, V>> -> @_:H -> Pair(H, Out)) -> @handle:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @observed:Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, Pair(Bool, V)) -> @next:(@_:0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>> -> Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, List<&2, Out>)) -> Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, List<&2, Out>)

template scan source · line 110 · raw

@-S:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Out:Data -> @-spec:Spec<S> -> @-component_selected:(@_:0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>> -> @_:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, Pair(Bool, V))) -> @-body:(@-H:Type -> @_:0xf435da9e535b3846d643dad16580e35f/capabilities.ValueRead<H, Row<S, V>> -> @_:H -> Pair(H, Out)) -> @handles:List<&2, 0xf435da9e535b3846d643dad16580e35f/world.Handle<S>> -> @tx:0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>> -> Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, List<&2, Out>)

template finish source · line 114 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Out:Data -> @observed:Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, List<&2, Out>) -> Pair(0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, List<&2, Out>)

template reserved source · line 117 · raw

@-S:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Out:Data -> @-spec:Spec<S> -> @-component_selected:(@_:0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>> -> @_:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, Pair(Bool, V))) -> @-body:(@-H:Type -> @_:0xf435da9e535b3846d643dad16580e35f/capabilities.ValueRead<H, Row<S, V>> -> @_:H -> Pair(H, Out)) -> @observed:Pair(0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, List<&2, 0xf435da9e535b3846d643dad16580e35f/world.Handle<S>>) -> Pair(0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, List<&2, Out>)

template each source · line 120 · raw

@-S:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Out:Data -> @-spec:Spec<S> -> @-component_selected:(@_:0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>> -> @_:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, Pair(Bool, V))) -> @-body:(@-H:Type -> @_:0xf435da9e535b3846d643dad16580e35f/capabilities.ValueRead<H, Row<S, V>> -> @_:H -> Pair(H, Out)) -> @world:0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>> -> Pair(0xf435da9e535b3846d643dad16580e35f/world.World<S, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Store<S, C>, R, 0xf435da9e535b3846d643dad16580e35f/relation_commands.Notice<S, E>>, List<&2, Out>)