~/bend-docscommunity

relation_commands.bend checks

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

9 imports
import Base
import ./trace_relation.bend as TraceRel
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 C
import world.bend as W
import transaction.bend as X

Types

type Store source · line 13 · raw

@S:Data -> @Components:Type -> Type

Experiment-only transport: never duplicates or inspects arbitrary component owners. This initial seam implements relate/unrelate, not linked cleanup or keyed retention.

type Notice source · line 15 · raw

@S:Data -> @Original:Data -> Data

type QueueStatus source · line 20 · raw

Data

Templates

template empty source · line 23 · raw

@-S:Data -> @-C:Type -> @components:C -> Store<S, C>

template graph_read source · line 25 · raw

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

template graph_replace source · line 28 · raw

@-S:Data -> @-C:Type -> @store:Store<S, C> -> @replacement:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Graph<S> -> Store<S, C>

template relate_result source · line 31 · raw

@-S:Data -> @-C:Type -> @result:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.CoreResult<S> -> @components:C -> Pair(Store<S, C>, Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Error>)

template store_relate source · line 34 · raw

@-S:Data -> @-C:Type -> @store:Store<S, C> -> @descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @source:0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key -> @target:0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key -> @sourceLive:Bool -> @targetLive:Bool -> Pair(Store<S, C>, Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Error>)

template publish_relate source · line 37 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @observed:Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Error>) -> @descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @source:0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key -> @target:0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key -> 0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>

template apply_live_result source · line 41 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @checked:Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Bool) -> @+descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @+source:0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key -> @+target:0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key -> @sourceLive:Bool -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Error>)

template apply_source_result source · line 44 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @checked:Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Bool) -> @descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @source:0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key -> @target:0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key -> @targetHandle:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Error>)

template apply_relate_result source · line 47 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>> -> @descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @+source:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> @+target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Error>)

template apply_relate source · line 50 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>> -> @+descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @+source:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> @+target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> 0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>

template applied_relate_traced source · line 52 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @trace:0x14a72e1c180a5ab1f8a056d43822425c/trace_facts.State -> @+descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @+source:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> @+target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> @result:Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Error>) -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, 0x14a72e1c180a5ab1f8a056d43822425c/trace_facts.State)

template relate_command source · line 55 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @enabled:Bool -> @+descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @+source:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> @+target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> 0x14a72e1c180a5ab1f8a056d43822425c/deferred_command.Command<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>>

template relate_staged source · line 59 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @+descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @+source:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> @+target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> @tx:0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Notice<S, E>> -> 0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Notice<S, E>>

template relate_refused source · line 62 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @source:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> @target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> @tx:0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Notice<S, E>> -> 0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Notice<S, E>>

template queue_checked source · line 65 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @same:Bool -> @tx:0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Notice<S, E>> -> @descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @source:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> @target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Notice<S, E>>, QueueStatus)

template queue_namespaced source · line 69 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @checked:Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, U32) -> @undo:List<&1, @_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>> -> 0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>> -> @commands:List<&1, 0x14a72e1c180a5ab1f8a056d43822425c/deferred_command.Command<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>>> -> @events:List<&2, Notice<S, E>> -> @trace:0x14a72e1c180a5ab1f8a056d43822425c/trace_facts.State -> @descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @source:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> @target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Notice<S, E>>, QueueStatus)

template queue_relate source · line 72 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @tx:0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Notice<S, E>> -> @descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @source:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> @target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Notice<S, E>>, QueueStatus)

template store_unrelate source · line 75 · raw

@-S:Data -> @-C:Type -> @store:Store<S, C> -> @descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @source:0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key -> Pair(Store<S, C>, Unit)

template discard_unit source · line 78 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @result:Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Unit) -> 0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>

template apply_unrelate source · line 81 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>> -> @descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @source:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> 0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>

template unrelate_command source · line 84 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @enabled:Bool -> @+descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @+source:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> 0x14a72e1c180a5ab1f8a056d43822425c/deferred_command.Command<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>>

template unrelate_staged source · line 88 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @+descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @+source:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> @tx:0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Notice<S, E>> -> 0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Notice<S, E>>

template unrelate_refused source · line 91 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @source:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> @tx:0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Notice<S, E>> -> 0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Notice<S, E>>

template queue_clear_checked source · line 94 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @same:Bool -> @tx:0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Notice<S, E>> -> @descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @source:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Notice<S, E>>, QueueStatus)

template queue_clear_namespaced source · line 98 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @checked:Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, U32) -> @undo:List<&1, @_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>> -> 0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>> -> @commands:List<&1, 0x14a72e1c180a5ab1f8a056d43822425c/deferred_command.Command<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>>> -> @events:List<&2, Notice<S, E>> -> @trace:0x14a72e1c180a5ab1f8a056d43822425c/trace_facts.State -> @descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @source:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Notice<S, E>>, QueueStatus)

template queue_unrelate source · line 101 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @tx:0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Notice<S, E>> -> @descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @source:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Notice<S, E>>, QueueStatus)

template store_inverse source · line 104 · raw

@-S:Data -> @-C:Type -> @store:Store<S, C> -> @descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @target:0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key -> Pair(Store<S, C>, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key>)

template inverse_present source · line 107 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @result:Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key>) -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Maybe<&2, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key>>)

template inverse_checked source · line 110 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @checked:Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Bool) -> @descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Maybe<&2, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key>>)

template inverse source · line 114 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>> -> @descriptor:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @+target:0x14a72e1c180a5ab1f8a056d43822425c/world.Handle<S> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, Store<S, C>, R, Notice<S, E>>, Maybe<&2, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key>>)