graph-store: %node-siblings fixed
(~(put in validators) u.mark)
==
%- zing
- :~ (give [/updates /keys ~] [%add-graph resource graph mark overwrite])
+ :~ (give [/keys ~] %keys ~(key by graphs))
+ (give [/updates ~] %add-graph resource *graph:store mark overwrite)
clay-backup
?~ mark ~
?: (~(has in validators) u.mark) ~
:+ %add-nodes
[ship term]
%- ~(gas by *(map index:store node:store))
+ :: TODO time complexity not desirable
+ :: replace with custom ordered map functions
%+ turn
- =- ?:(older (slag (sub (lent -) count) -) (scag count -))
+ =- ?.(older (slag (safe-sub (lent -) count) -) (scag count -))
%- tap:orm
%+ subset:orm u.graph
=/ idx
(peek:orm-log:store update-log)
(bind result |=([=time update:store] time))
==
+ ::
+ ++ safe-sub
+ |= [a=@ b=@]
+ ^- @
+ ?: (gte b a)
+ 0
+ (sub a b)
+ ::
++ get-node-children
|= [=ship =term =index:store]
^- (unit graph:store)
