mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 10:02:47 +03:00
Merge pull request #4795 from urbit/la/fast-index
graph-store, metadata-store lib: skip trip and crip, use rap
This commit is contained in:
commit
f11a66a381
@ -145,18 +145,17 @@
|
||||
==
|
||||
::
|
||||
++ index
|
||||
|= i=^index
|
||||
|= ind=^index
|
||||
^- json
|
||||
?: =(~ i) s+'/'
|
||||
=/ j=^tape ""
|
||||
|-
|
||||
?~ i [%s (crip j)]
|
||||
=/ k=json (numb i.i)
|
||||
?> ?=(%n -.k)
|
||||
%_ $
|
||||
i t.i
|
||||
j (weld j (weld "/" (trip +.k)))
|
||||
==
|
||||
:- %s
|
||||
?: =(~ ind)
|
||||
'/'
|
||||
%+ roll ind
|
||||
|= [cur=@ acc=@t]
|
||||
^- @t
|
||||
=/ num (numb cur)
|
||||
?> ?=(%n -.num)
|
||||
(rap 3 acc '/' p.num ~)
|
||||
::
|
||||
++ uid
|
||||
|= u=^uid
|
||||
|
@ -23,13 +23,13 @@
|
||||
%+ turn ~(tap by associations)
|
||||
|= [=md-resource [group=resource =^metadatum]]
|
||||
^- [cord json]
|
||||
:-
|
||||
%- crip
|
||||
;: weld
|
||||
(trip (spat (en-path:resource group)))
|
||||
(weld "/" (trip app-name.md-resource))
|
||||
(trip (spat (en-path:resource resource.md-resource)))
|
||||
==
|
||||
:- %: rap 3
|
||||
(spat (en-path:resource group))
|
||||
'/'
|
||||
app-name.md-resource
|
||||
(spat (en-path:resource resource.md-resource))
|
||||
~
|
||||
==
|
||||
%- pairs
|
||||
:~ [%group s+(enjs-path:resource group)]
|
||||
[%app-name s+app-name.md-resource]
|
||||
|
Loading…
Reference in New Issue
Block a user