~/bend-docscommunity

relation_reorder_core.bend checks

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

4 imports
import Base
import entity_key.bend as K
import relation_types.bend as T
import relation_graph.bend as C

Definitions

def child_ids source · line 7 · raw

@children:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.ChildStatus> -> List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key>

Maintained inverse reorder: preserve authoritative targets; replace selected inverse order.

def parent_match source · line 11 · raw

@value:Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key> -> @parent:0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key -> Bool

def same_count source · line 15 · raw

@a:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key> -> @b:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key> -> Bool

def subset source · line 20 · raw

@a:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key> -> @+b:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key> -> Bool

def child_error source · line 24 · raw

@live:Bool -> @duplicate:Bool -> @related:Bool -> @parent:0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key -> @child:0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key -> @+name:String -> Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Error>

def first_error source · line 30 · raw

@current:Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Error> -> @next:(@_:Unit -> Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Error>) -> Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Error>

def mismatch source · line 38 · raw

@same:Bool -> @error:Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Error> -> @parent:0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key -> @name:String -> Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Error>

Templates

template children_checked source · line 34 · raw

@-S:Data -> @children:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.ChildStatus> -> @+graph:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Graph<S> -> @+d:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @+parent:0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key -> @+seen:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key> -> Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Error>

template validate source · line 43 · raw

@-S:Data -> @parentLive:Bool -> @+graph:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Graph<S> -> @+d:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @+parent:0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key -> @+children:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.ChildStatus> -> Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Error>

template replaced source · line 48 · raw

@-S:Data -> @found:Bool -> @entry:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Inverse<S> -> @sources:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key> -> @rest:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Inverse<S>> -> List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Inverse<S>>

Maintained inverse reorder changes only the selected inverse entry.

template replace_inverse source · line 52 · raw

@-S:Data -> @entries:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Inverse<S>> -> @+d:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @+parent:0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key -> @+sources:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key> -> List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Inverse<S>>

template checked source · line 56 · raw

@-S:Data -> @error:Maybe<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Error> -> @graph:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Graph<S> -> @d:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @parent:0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key -> @children:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.ChildStatus> -> 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.CoreResult<S>

template reorder source · line 60 · raw

@-S:Data -> @+graph:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Graph<S> -> @+d:0x14a72e1c180a5ab1f8a056d43822425c/relation_types.Descriptor<S> -> @+parent:0x14a72e1c180a5ab1f8a056d43822425c/entity_key.Key -> @+children:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.ChildStatus> -> @parentLive:Bool -> 0x14a72e1c180a5ab1f8a056d43822425c/relation_types.CoreResult<S>