2021-02-02 03:40:40 +03:00
|
|
|
/- spider, graph-view, graph=graph-store, metadata=metadata-store, *group, group-store
|
2020-09-03 08:07:18 +03:00
|
|
|
/+ strandio, resource
|
|
|
|
=>
|
|
|
|
|%
|
|
|
|
++ strand strand:spider
|
|
|
|
++ poke poke:strandio
|
|
|
|
++ poke-our poke-our:strandio
|
2020-09-04 10:51:28 +03:00
|
|
|
::
|
2020-09-03 08:07:18 +03:00
|
|
|
++ scry-metadata
|
|
|
|
|= rid=resource
|
2021-02-01 09:27:38 +03:00
|
|
|
=/ m (strand ,resource)
|
|
|
|
;< group=(unit resource) bind:m
|
|
|
|
%+ scry:strandio ,(unit resource)
|
2020-09-03 08:07:18 +03:00
|
|
|
;: weld
|
2020-09-19 00:59:56 +03:00
|
|
|
/gx/metadata-store/resource/graph
|
2020-09-03 08:07:18 +03:00
|
|
|
(en-path:resource rid)
|
|
|
|
/noun
|
|
|
|
==
|
2021-02-01 09:27:38 +03:00
|
|
|
(pure:m (need group))
|
2020-09-04 10:51:28 +03:00
|
|
|
::
|
2020-09-03 08:07:18 +03:00
|
|
|
++ scry-group
|
|
|
|
|= rid=resource
|
2020-09-10 13:20:00 +03:00
|
|
|
=/ m (strand ,group)
|
2020-09-03 08:07:18 +03:00
|
|
|
;< ugroup=(unit group) bind:m
|
|
|
|
%+ scry:strandio ,(unit group)
|
|
|
|
;: weld
|
2020-09-10 13:20:00 +03:00
|
|
|
/gx/group-store/groups
|
2020-09-03 08:07:18 +03:00
|
|
|
(en-path:resource rid)
|
|
|
|
/noun
|
|
|
|
==
|
|
|
|
(pure:m (need ugroup))
|
2020-09-04 10:51:28 +03:00
|
|
|
::
|
2020-09-03 08:07:18 +03:00
|
|
|
++ delete-graph
|
2021-01-06 21:49:13 +03:00
|
|
|
|= [group-rid=resource rid=resource]
|
2020-09-03 08:07:18 +03:00
|
|
|
=/ m (strand ,~)
|
2020-09-11 06:08:16 +03:00
|
|
|
^- form:m
|
2020-09-10 13:20:00 +03:00
|
|
|
;< =bowl:spider bind:m get-bowl:strandio
|
2020-09-03 08:07:18 +03:00
|
|
|
;< ~ bind:m
|
2020-09-19 00:59:56 +03:00
|
|
|
(poke-our %graph-store %graph-update !>([%0 now.bowl %remove-graph rid]))
|
|
|
|
;< ~ bind:m
|
|
|
|
(poke-our %graph-push-hook %push-hook-action !>([%remove rid]))
|
2020-10-20 23:15:58 +03:00
|
|
|
;< ~ bind:m
|
2021-02-01 09:27:38 +03:00
|
|
|
%+ poke-our %metadata-push-hook
|
|
|
|
:- %metadata-update
|
|
|
|
!> ^- action:metadata
|
|
|
|
[%remove group-rid [%graph rid]]
|
2020-09-03 08:07:18 +03:00
|
|
|
(pure:m ~)
|
2021-01-28 07:59:26 +03:00
|
|
|
::
|
|
|
|
++ delete-tags
|
|
|
|
|= [graph=resource grp-rid=resource =group]
|
|
|
|
=/ m (strand ,~)
|
|
|
|
^- form:m
|
|
|
|
=/ tags=(list [=tag tagged=(set ship)])
|
2021-02-10 10:20:32 +03:00
|
|
|
%+ skim ~(tap by tags.group)
|
|
|
|
|= [=tag tagged=(set ship)]
|
2021-01-28 07:59:26 +03:00
|
|
|
?@ tag %.n
|
|
|
|
?& =(app.tag %graph)
|
|
|
|
=(resource.tag graph)
|
|
|
|
==
|
|
|
|
|- =* loop $
|
|
|
|
^- form:m
|
|
|
|
?~ tags
|
|
|
|
(pure:m ~)
|
|
|
|
;< ~ bind:m
|
|
|
|
%+ poke [entity.grp-rid %group-push-hook]
|
|
|
|
:- %group-update
|
|
|
|
!> ^- update:group-store
|
|
|
|
[%remove-tag grp-rid tag.i.tags tagged.i.tags]
|
|
|
|
loop(tags t.tags)
|
2020-09-03 08:07:18 +03:00
|
|
|
--
|
2020-09-04 10:51:28 +03:00
|
|
|
::
|
2020-09-03 08:07:18 +03:00
|
|
|
^- thread:spider
|
|
|
|
|= arg=vase
|
|
|
|
=/ m (strand ,vase)
|
|
|
|
^- form:m
|
2020-12-02 01:38:02 +03:00
|
|
|
=+ !<([~ =action:graph-view] arg)
|
2020-09-03 08:07:18 +03:00
|
|
|
?> ?=(%delete -.action)
|
|
|
|
;< =bowl:spider bind:m get-bowl:strandio
|
2020-09-11 06:08:16 +03:00
|
|
|
?. =(our.bowl entity.rid.action)
|
|
|
|
(strand-fail:strandio %bad-request ~)
|
2021-02-01 09:27:38 +03:00
|
|
|
;< group-rid=resource bind:m
|
2020-09-03 08:07:18 +03:00
|
|
|
(scry-metadata rid.action)
|
2020-09-10 13:20:00 +03:00
|
|
|
;< =group bind:m
|
2021-02-01 09:27:38 +03:00
|
|
|
(scry-group group-rid)
|
2021-01-28 07:59:26 +03:00
|
|
|
;< ~ bind:m
|
2021-02-02 03:40:40 +03:00
|
|
|
(delete-tags rid.action group-rid group)
|
2021-02-01 07:07:39 +03:00
|
|
|
;< ~ bind:m
|
2021-02-01 09:27:38 +03:00
|
|
|
(delete-graph group-rid rid.action)
|
2020-09-10 13:20:00 +03:00
|
|
|
?. hidden.group
|
|
|
|
(pure:m !>(~))
|
2021-02-01 07:07:39 +03:00
|
|
|
;< =thread-result:strandio bind:m
|
2021-02-01 09:27:38 +03:00
|
|
|
(await-thread:strandio %group-delete !>(`[%remove rid.action]))
|
2020-09-03 08:07:18 +03:00
|
|
|
(pure:m !>(~))
|
2021-02-01 07:07:39 +03:00
|
|
|
|