lib/graph: add +get-node

This commit is contained in:
Liam Fitzgerald 2020-11-03 10:19:58 +10:00
parent e279b08049
commit 5c0d175998

View File

@ -17,6 +17,18 @@
%+ scry-for update:store
/graph/(scot %p entity.res)/[name.res]
::
++ get-node
|= [res=resource =index:store]
^- node:store
=+ %+ scry-for ,=update:store
%+ weld
/node/(scot %p entity.res)/[name.res]
(turn index (cury scot %ud))
?> ?=(%0 -.update)
?> ?=(%add-nodes -.q.update)
?> ?=(^ nodes.q.update)
q.n.nodes.q.update
::
++ get-update-log
|= rid=resource
^- update-log:store