relation_reorder_core.bend checks
raw source on the hub · import bendvy-ecs-core@0.1.0.3/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, 0x704c77730661eff4309838fc738ef615/relation_types.ChildStatus> -> List<&2, 0x704c77730661eff4309838fc738ef615/entity_key.Key>
Maintained inverse reorder: preserve authoritative targets; replace selected inverse order.
def parent_match source · line 11 · raw
@value:Maybe<&2, 0x704c77730661eff4309838fc738ef615/entity_key.Key> -> @parent:0x704c77730661eff4309838fc738ef615/entity_key.Key -> Bool
def same_count source · line 15 · raw
@a:List<&2, 0x704c77730661eff4309838fc738ef615/entity_key.Key> -> @b:List<&2, 0x704c77730661eff4309838fc738ef615/entity_key.Key> -> Bool
def subset source · line 20 · raw
@a:List<&2, 0x704c77730661eff4309838fc738ef615/entity_key.Key> -> @+b:List<&2, 0x704c77730661eff4309838fc738ef615/entity_key.Key> -> Bool
def child_error source · line 24 · raw
@live:Bool -> @duplicate:Bool -> @related:Bool -> @parent:0x704c77730661eff4309838fc738ef615/entity_key.Key -> @child:0x704c77730661eff4309838fc738ef615/entity_key.Key -> @+name:String -> Maybe<&2, 0x704c77730661eff4309838fc738ef615/relation_types.Error>
def first_error source · line 30 · raw
@current:Maybe<&2, 0x704c77730661eff4309838fc738ef615/relation_types.Error> -> @next:(@_:Unit -> Maybe<&2, 0x704c77730661eff4309838fc738ef615/relation_types.Error>) -> Maybe<&2, 0x704c77730661eff4309838fc738ef615/relation_types.Error>
def children_checked_erased source · line 34 · raw
@-S:Data -> @children:List<&2, 0x704c77730661eff4309838fc738ef615/relation_types.ChildStatus> -> @+graph:0x704c77730661eff4309838fc738ef615/relation_types.Graph<S> -> @+d:0x704c77730661eff4309838fc738ef615/relation_types.Descriptor<S> -> @+parent:0x704c77730661eff4309838fc738ef615/entity_key.Key -> @+seen:List<&2, 0x704c77730661eff4309838fc738ef615/entity_key.Key> -> Maybe<&2, 0x704c77730661eff4309838fc738ef615/relation_types.Error>
def mismatch source · line 38 · raw
@same:Bool -> @error:Maybe<&2, 0x704c77730661eff4309838fc738ef615/relation_types.Error> -> @parent:0x704c77730661eff4309838fc738ef615/entity_key.Key -> @name:String -> Maybe<&2, 0x704c77730661eff4309838fc738ef615/relation_types.Error>
def validate_erased source · line 43 · raw
@-S:Data -> @parentLive:Bool -> @+graph:0x704c77730661eff4309838fc738ef615/relation_types.Graph<S> -> @+d:0x704c77730661eff4309838fc738ef615/relation_types.Descriptor<S> -> @+parent:0x704c77730661eff4309838fc738ef615/entity_key.Key -> @+children:List<&2, 0x704c77730661eff4309838fc738ef615/relation_types.ChildStatus> -> Maybe<&2, 0x704c77730661eff4309838fc738ef615/relation_types.Error>
def replaced_erased source · line 48 · raw
@-S:Data -> @found:Bool -> @entry:0x704c77730661eff4309838fc738ef615/relation_types.Inverse<S> -> @sources:List<&2, 0x704c77730661eff4309838fc738ef615/entity_key.Key> -> @rest:List<&2, 0x704c77730661eff4309838fc738ef615/relation_types.Inverse<S>> -> List<&2, 0x704c77730661eff4309838fc738ef615/relation_types.Inverse<S>>
Maintained inverse reorder changes only the selected inverse entry.
def replace_inverse_erased source · line 52 · raw
@-S:Data -> @entries:List<&2, 0x704c77730661eff4309838fc738ef615/relation_types.Inverse<S>> -> @+d:0x704c77730661eff4309838fc738ef615/relation_types.Descriptor<S> -> @+parent:0x704c77730661eff4309838fc738ef615/entity_key.Key -> @+sources:List<&2, 0x704c77730661eff4309838fc738ef615/entity_key.Key> -> List<&2, 0x704c77730661eff4309838fc738ef615/relation_types.Inverse<S>>
def checked_erased source · line 56 · raw
@-S:Data -> @error:Maybe<&2, 0x704c77730661eff4309838fc738ef615/relation_types.Error> -> @graph:0x704c77730661eff4309838fc738ef615/relation_types.Graph<S> -> @d:0x704c77730661eff4309838fc738ef615/relation_types.Descriptor<S> -> @parent:0x704c77730661eff4309838fc738ef615/entity_key.Key -> @children:List<&2, 0x704c77730661eff4309838fc738ef615/relation_types.ChildStatus> -> 0x704c77730661eff4309838fc738ef615/relation_types.CoreResult<S>
def reorder_erased source · line 60 · raw
@-S:Data -> @+graph:0x704c77730661eff4309838fc738ef615/relation_types.Graph<S> -> @+d:0x704c77730661eff4309838fc738ef615/relation_types.Descriptor<S> -> @+parent:0x704c77730661eff4309838fc738ef615/entity_key.Key -> @+children:List<&2, 0x704c77730661eff4309838fc738ef615/relation_types.ChildStatus> -> @parentLive:Bool -> 0x704c77730661eff4309838fc738ef615/relation_types.CoreResult<S>
Templates
template children_checked source · line 63 · raw
@-S:Data -> @children:List<&2, 0x704c77730661eff4309838fc738ef615/relation_types.ChildStatus> -> @+graph:0x704c77730661eff4309838fc738ef615/relation_types.Graph<S> -> @+d:0x704c77730661eff4309838fc738ef615/relation_types.Descriptor<S> -> @+parent:0x704c77730661eff4309838fc738ef615/entity_key.Key -> @+seen:List<&2, 0x704c77730661eff4309838fc738ef615/entity_key.Key> -> Maybe<&2, 0x704c77730661eff4309838fc738ef615/relation_types.Error>
Public schema-specialized entry points delegate to the same erased algorithms.
template validate source · line 65 · raw
@-S:Data -> @parentLive:Bool -> @+graph:0x704c77730661eff4309838fc738ef615/relation_types.Graph<S> -> @+d:0x704c77730661eff4309838fc738ef615/relation_types.Descriptor<S> -> @+parent:0x704c77730661eff4309838fc738ef615/entity_key.Key -> @+children:List<&2, 0x704c77730661eff4309838fc738ef615/relation_types.ChildStatus> -> Maybe<&2, 0x704c77730661eff4309838fc738ef615/relation_types.Error>
template replaced source · line 67 · raw
@-S:Data -> @found:Bool -> @entry:0x704c77730661eff4309838fc738ef615/relation_types.Inverse<S> -> @sources:List<&2, 0x704c77730661eff4309838fc738ef615/entity_key.Key> -> @rest:List<&2, 0x704c77730661eff4309838fc738ef615/relation_types.Inverse<S>> -> List<&2, 0x704c77730661eff4309838fc738ef615/relation_types.Inverse<S>>
template replace_inverse source · line 69 · raw
@-S:Data -> @entries:List<&2, 0x704c77730661eff4309838fc738ef615/relation_types.Inverse<S>> -> @+d:0x704c77730661eff4309838fc738ef615/relation_types.Descriptor<S> -> @+parent:0x704c77730661eff4309838fc738ef615/entity_key.Key -> @+sources:List<&2, 0x704c77730661eff4309838fc738ef615/entity_key.Key> -> List<&2, 0x704c77730661eff4309838fc738ef615/relation_types.Inverse<S>>
template checked source · line 71 · raw
@-S:Data -> @error:Maybe<&2, 0x704c77730661eff4309838fc738ef615/relation_types.Error> -> @graph:0x704c77730661eff4309838fc738ef615/relation_types.Graph<S> -> @d:0x704c77730661eff4309838fc738ef615/relation_types.Descriptor<S> -> @parent:0x704c77730661eff4309838fc738ef615/entity_key.Key -> @children:List<&2, 0x704c77730661eff4309838fc738ef615/relation_types.ChildStatus> -> 0x704c77730661eff4309838fc738ef615/relation_types.CoreResult<S>
template reorder source · line 73 · raw
@-S:Data -> @+graph:0x704c77730661eff4309838fc738ef615/relation_types.Graph<S> -> @+d:0x704c77730661eff4309838fc738ef615/relation_types.Descriptor<S> -> @+parent:0x704c77730661eff4309838fc738ef615/entity_key.Key -> @+children:List<&2, 0x704c77730661eff4309838fc738ef615/relation_types.ChildStatus> -> @parentLive:Bool -> 0x704c77730661eff4309838fc738ef615/relation_types.CoreResult<S>