-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogseq_runtime_inputs.edn
More file actions
153 lines (153 loc) · 5.49 KB
/
Copy pathlogseq_runtime_inputs.edn
File metadata and controls
153 lines (153 loc) · 5.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
{:rules
[[(has-ref ?b ?r) [?b :block/refs ?r]]
[(has-ref ?b ?r) (parent ?p ?b) [?p :block/refs ?r]]
[(class-extends ?p ?c) [?c :logseq.property.class/extends ?p]]
[(class-extends ?p ?c)
[?t :logseq.property.class/extends ?p]
(class-extends ?t ?c)]
[(ref-property-value ?b ?prop-e ?val)
[?prop-e :db/ident ?prop]
[?b ?prop ?pv]
(ref->val ?pv ?val)]
[(tag-spec->tag ?tag ?spec)
[(number? ?spec)]
[(identity ?spec) ?tag]]
[(tag-spec->tag ?tag ?spec) [?tag :block/title ?spec]]
[(tag-spec->tag ?tag ?spec) [?tag :db/ident ?spec]]
[(tags ?b ?tags)
[(identity ?tags) [?spec ...]]
(tag-spec->tag ?tag ?spec)
[?b :block/tags ?tc]
(or [(= ?tag ?tc)] (class-extends ?tag ?tc))
[(missing? $ ?b :block/link)]]
[(has-simple-query-property ?b ?prop)
[?prop-e :db/ident ?prop]
[?prop-e :block/tags :logseq.class/Property]
(has-property-or-object-property? ?b ?prop)
(or
[(missing? $ ?prop-e :logseq.property/public?)]
[?prop-e :logseq.property/public? true])]
[(has-private-simple-query-property ?b ?prop)
[?prop-e :db/ident ?prop]
[?prop-e :block/tags :logseq.class/Property]
(has-property-or-object-property? ?b ?prop)]
[(scalar-property-with-default ?b ?prop ?val)
[?prop-e :db/ident ?prop]
(scalar-property-value-with-default ?b ?prop-e ?val)
(or
[(missing? $ ?prop-e :logseq.property/public?)]
[?prop-e :logseq.property/public? true])]
[(self-ref ?b ?ref) [?b :block/refs ?ref]]
[(scalar-property ?b ?prop ?val)
[?prop-e :db/ident ?prop]
(scalar-property-value ?b ?prop-e ?val)
(or
[(missing? $ ?prop-e :logseq.property/public?)]
[?prop-e :logseq.property/public? true])]
[(parent ?p ?c) [?c :block/parent ?p]]
[(parent ?p ?c) [?t :block/parent ?p] (parent ?t ?c)]
[(private-scalar-property-with-default ?b ?prop ?val)
[?prop-e :db/ident ?prop]
[?prop-e :block/tags :logseq.class/Property]
(scalar-property-value-with-default ?b ?prop-e ?val)]
[(task ?b ?statuses)
(ref-property-with-default ?b :logseq.property/status ?val)
[(contains? ?statuses ?val)]]
[(property ?b ?prop ?val)
[?prop-e :db/ident ?prop]
[?prop-e :block/tags :logseq.class/Property]
(or
[(missing? $ ?prop-e :logseq.property/public?)]
[?prop-e :logseq.property/public? true])
[?b ?prop ?pv]
(or
(and [(missing? $ ?prop-e :db/valueType)] [?b ?prop ?val])
(and
[?prop-e :db/valueType :db.type/ref]
(or [?pv :block/title ?val] [?pv :logseq.property/value ?val])))]
[(private-scalar-property ?b ?prop ?val)
[?prop-e :db/ident ?prop]
[?prop-e :block/tags :logseq.class/Property]
(scalar-property-value ?b ?prop-e ?val)]
[(ref-property-with-default ?b ?prop ?val)
[?prop-e :db/ident ?prop]
(ref-property-value-with-default ?b ?prop-e ?val)
(or
[(missing? $ ?prop-e :logseq.property/public?)]
[?prop-e :logseq.property/public? true])]
[(block-content ?b ?query)
[?b :block/title ?content]
[(clojure.string/includes? ?content ?query)]]
[(property-missing-value ?b ?prop-e ?default-p ?default-v)
[?t :logseq.property.class/properties ?prop-e]
[?prop-e :db/ident ?prop]
(object-has-class-property? ?b ?prop)
[(get-else $ ?b ?prop "N/A") ?prop-v]
[(= ?prop-v "N/A")]
[?prop-e ?default-p ?default-v]]
[(between ?b ?start ?end)
[?b :block/page ?p]
[?p :block/tags :logseq.class/Journal]
[?p :block/journal-day ?d]
[(>= ?d ?start)]
[(<= ?d ?end)]]
[(page ?b ?page-name)
[?b :block/page ?bp]
[?bp :block/name ?page-name]]
[(object-has-class-property? ?b ?prop)
[?prop-e :db/ident ?prop]
[?t :logseq.property.class/properties ?prop-e]
[?b :block/tags ?tc]
(or [(= ?t ?tc)] (class-extends ?t ?tc))]
[(page-ref ?b ?ref) (has-ref ?b ?ref)]
[(alias ?e2 ?e1) [?e2 :block/alias ?e1]]
[(alias ?e2 ?e1) [?e1 :block/alias ?e2]]
[(priority ?b ?priorities)
(ref-property-with-default ?b :logseq.property/priority ?priority)
[(contains? ?priorities ?priority)]]
[(ref-property ?b ?prop ?val)
[?prop-e :db/ident ?prop]
(ref-property-value ?b ?prop-e ?val)
(or
[(missing? $ ?prop-e :logseq.property/public?)]
[?prop-e :logseq.property/public? true])]
[(has-property ?b ?prop)
[?b ?prop _]
[?prop-e :db/ident ?prop]
[?prop-e :block/tags :logseq.class/Property]
(or
[(missing? $ ?prop-e :logseq.property/public?)]
[?prop-e :logseq.property/public? true])]
[(ref->val ?pv ?val) [?pv :block/title ?val]]
[(ref->val ?pv ?val) [?pv :logseq.property/value ?val]]
[(scalar-property-value-with-default ?b ?prop-e ?val)
(scalar-property-value ?b ?prop-e ?val)]
[(scalar-property-value-with-default ?b ?prop-e ?val)
(property-missing-value
?b
?prop-e
:logseq.property/scalar-default-value
?val)]
[(private-ref-property ?b ?prop ?val)
[?prop-e :db/ident ?prop]
[?prop-e :block/tags :logseq.class/Property]
(ref-property-value ?b ?prop-e ?val)]
[(has-property-or-object-property? ?b ?prop)
[?prop-e :db/ident ?prop]
(or [?b ?prop _] (object-has-class-property? ?b ?prop))]
[(private-ref-property-with-default ?b ?prop ?val)
[?prop-e :db/ident ?prop]
[?prop-e :block/tags :logseq.class/Property]
(ref-property-value-with-default ?b ?prop-e ?val)]
[(scalar-property-value ?b ?prop-e ?val)
[?prop-e :db/ident ?prop]
[?b ?prop ?val]]
[(ref-property-value-with-default ?b ?prop-e ?val)
(ref-property-value ?b ?prop-e ?val)]
[(ref-property-value-with-default ?b ?prop-e ?val)
(property-missing-value
?b
?prop-e
:logseq.property/default-value
?pv)
(ref->val ?pv ?val)]]}