graph-store: correctly subset in scries

This commit is contained in:
Liam Fitzgerald 2020-11-17 18:00:29 +10:00
parent 942c6bd8f4
commit 5615c10c2b
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB

View File

@ -658,7 +658,7 @@
:+ %add-nodes :+ %add-nodes
[ship term] [ship term]
%- ~(gas by *(map index:store node:store)) %- ~(gas by *(map index:store node:store))
%+ turn (tap:orm `graph:store`(subset:orm p.children.u.node start end)) %+ turn (tap:orm `graph:store`(subset:orm p.children.u.node end start))
|= [=atom =node:store] |= [=atom =node:store]
^- [index:store node:store] ^- [index:store node:store]
[(snoc index atom) node] [(snoc index atom) node]
@ -671,7 +671,8 @@
=/ end=(unit time) (slaw %da i.t.t.t.t.t.path) =/ end=(unit time) (slaw %da i.t.t.t.t.t.path)
=/ update-log=(unit update-log:store) (~(get by update-logs) [ship term]) =/ update-log=(unit update-log:store) (~(get by update-logs) [ship term])
?~ update-log [~ ~] ?~ update-log [~ ~]
``noun+!>((subset:orm-log u.update-log start end)) :: orm-log is ordered backwards, so swap start and end
``noun+!>((subset:orm-log u.update-log end start))
:: ::
[%x %update-log @ @ ~] [%x %update-log @ @ ~]
=/ =ship (slav %p i.t.t.path) =/ =ship (slav %p i.t.t.path)