mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 11:33:41 +03:00
metadata-store: based on discussion with @ixv, made differences between graphs and groups in metadatum more clear
This commit is contained in:
parent
45b2ea4096
commit
7da7da8e1e
@ -280,8 +280,9 @@
|
||||
(peek-metadatum:met %graph rid)
|
||||
?~ metadatum `state
|
||||
=/ module=term
|
||||
?. ?=(%& -.module.u.metadatum) %$
|
||||
p.module.u.metadatum
|
||||
?: ?=(%empty -.config.u.metadatum) %$
|
||||
?: ?=(%group -.config.u.metadatum) %$
|
||||
module.config.u.metadatum
|
||||
abet:check:(abed:handle-update:ha rid nodes u.group module)
|
||||
--
|
||||
::
|
||||
|
@ -273,10 +273,10 @@
|
||||
creator creator.m
|
||||
preview preview.m
|
||||
::
|
||||
module
|
||||
config
|
||||
?: =(module.m %$)
|
||||
[%| ~]
|
||||
[%& module.m]
|
||||
[%group ~]
|
||||
[%graph module.m]
|
||||
==
|
||||
::
|
||||
++ associations-1-to-2
|
||||
@ -303,7 +303,7 @@
|
||||
::
|
||||
++ metadata-1-to-2
|
||||
|= m=metadata-1
|
||||
%* . *metadatum:store
|
||||
%* . *metadatum-2
|
||||
title title.m
|
||||
description description.m
|
||||
color color.m
|
||||
|
@ -47,16 +47,22 @@
|
||||
[%date-created s+(scot %da date-created.met)]
|
||||
[%creator s+(scot %p creator.met)]
|
||||
::
|
||||
:- %module
|
||||
?: ?=(%& -.module.met)
|
||||
s+p.module.met
|
||||
?~ p.module.met
|
||||
~
|
||||
?~ u.p.module.met
|
||||
o+~
|
||||
%- pairs
|
||||
:~ [%app-name s+app-name.u.u.p.module.met]
|
||||
[%resource s+(enjs-path:resource resource.u.u.p.module.met)]
|
||||
:- %config
|
||||
?+ -.config.met o+~
|
||||
%graph
|
||||
%+ frond %graph
|
||||
s+module.config.met
|
||||
::
|
||||
%group
|
||||
%+ frond %group
|
||||
?~ feed.config.met
|
||||
~
|
||||
?~ u.feed.config.met
|
||||
o+~
|
||||
%- pairs
|
||||
:~ [%app-name s+app-name.u.u.feed.config.met]
|
||||
[%resource s+(enjs-path:resource resource.u.u.feed.config.met)]
|
||||
==
|
||||
==
|
||||
::
|
||||
[%picture s+picture.met]
|
||||
@ -168,21 +174,21 @@
|
||||
[%color nu]
|
||||
[%date-created (se %da)]
|
||||
[%creator (su ;~(pfix sig fed:ag))]
|
||||
[%module module]
|
||||
[%config config]
|
||||
[%picture so]
|
||||
[%preview bo]
|
||||
[%vip vip]
|
||||
==
|
||||
::
|
||||
++ module
|
||||
++ config
|
||||
|= jon=^json
|
||||
^- (each term (unit (unit ^md-resource)))
|
||||
^- md-config
|
||||
?~ jon
|
||||
[%| ~]
|
||||
[%group ~]
|
||||
?: ?=(%s -.jon)
|
||||
[%& p.jon]
|
||||
[%graph p.jon]
|
||||
?> ?=(%o -.jon)
|
||||
:+ %| ~
|
||||
:+ %group ~
|
||||
?. ?& (~(has by p.jon) 'app-name')
|
||||
(~(has by p.jon) 'resource')
|
||||
==
|
||||
|
@ -28,13 +28,20 @@
|
||||
:: %$: No variation
|
||||
::
|
||||
+$ vip-metadata ?(%reader-comments %member-metadata %$)
|
||||
+$ md-config
|
||||
$~ [%empty ~]
|
||||
$% [%group feed=(unit (unit md-resource))]
|
||||
[%graph module=term]
|
||||
[%empty ~]
|
||||
==
|
||||
::
|
||||
+$ metadatum
|
||||
$: title=cord
|
||||
description=cord
|
||||
=color
|
||||
date-created=time
|
||||
creator=ship
|
||||
module=(each term (unit (unit md-resource)))
|
||||
config=md-config
|
||||
picture=url
|
||||
preview=?
|
||||
vip=vip-metadata
|
||||
|
Loading…
Reference in New Issue
Block a user