|
|
@@ -241,8 +241,9 @@
|
|
|
[?prop-e :db/ident ?prop]
|
|
|
[?prop-e :block/tags :logseq.class/Property]
|
|
|
(has-property-or-default-value? ?b ?prop)
|
|
|
- [?prop-e :property/public? ?public]
|
|
|
- [(= true ?public)]]
|
|
|
+ (or
|
|
|
+ [(missing? $ ?prop-e :property/public?)]
|
|
|
+ [?prop-e :property/public? true])]
|
|
|
|
|
|
;; Same as has-simple-query-property except it returns public and private properties like :block/title
|
|
|
:has-private-simple-query-property
|
|
|
@@ -257,16 +258,18 @@
|
|
|
[?b ?prop _]
|
|
|
[?prop-e :db/ident ?prop]
|
|
|
[?prop-e :block/tags :logseq.class/Property]
|
|
|
- [?prop-e :property/public? ?public]
|
|
|
- [(= true ?public)]]
|
|
|
+ (or
|
|
|
+ [(missing? $ ?prop-e :property/public?)]
|
|
|
+ [?prop-e :property/public? true])]
|
|
|
|
|
|
;; Checks if a property has a value for any features that are not simple queries
|
|
|
:property
|
|
|
'[(property ?b ?prop ?val)
|
|
|
[?prop-e :db/ident ?prop]
|
|
|
[?prop-e :block/tags :logseq.class/Property]
|
|
|
- [?prop-e :property/public? ?public]
|
|
|
- [(= true ?public)]
|
|
|
+ (or
|
|
|
+ [(missing? $ ?prop-e :property/public?)]
|
|
|
+ [?prop-e :property/public? true])
|
|
|
[?b ?prop ?pv]
|
|
|
(or
|
|
|
;; non-ref value
|
|
|
@@ -284,9 +287,9 @@
|
|
|
'[(simple-query-property ?b ?prop ?val)
|
|
|
[?prop-e :db/ident ?prop]
|
|
|
[?prop-e :block/tags :logseq.class/Property]
|
|
|
- [?prop-e :property/public? ?public]
|
|
|
- [(get ?prop-schema :type) ?type]
|
|
|
- [(= true ?public)]
|
|
|
+ (or
|
|
|
+ [(missing? $ ?prop-e :property/public?)]
|
|
|
+ [?prop-e :property/public? true])
|
|
|
(property-value ?b ?prop-e ?val)]
|
|
|
|
|
|
;; Same as property except it returns public and private properties like :block/title
|