mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 04:52:06 +03:00
lib/graph: add +get-node
This commit is contained in:
parent
e279b08049
commit
5c0d175998
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user