Hello,
Logseq already offers a lot of flexibility by using advanced queries. I would like to unleash more of its hidden powers by doing page graph traversal and searches with queries. Hiearchies often are too one-dimensional.
Take an example, what I mean with graph traversal:
Tienson Qin --develops--> Logseq <--partOf-- discuss.logseq.com
^ ^ ^ ^ ^
page < property page property > page
When there’s need to find everything related about Logseq, we search for [[discuss.logseq.com]]
, but query now also finds things from [[Tienson Qin]]
.
Logseq lays the groundwork to do so:
- use recursion in queries to get visit linked pages
- Logseq properties can map relations between pages
Sets are used in internally in many places of Datalog attributes, but currently capabilities are limited to deal with them in queries - one existing function is contains?
.
I think, what is still left is to allow to use more clojure collection functions from clojure.core
& Co.
In particular I need to add (clojure.core/conj
) or remove (clojure.core/disj
) items from a set, which contains excluded or already visited pages. Also properties are constructed out of maps and sets, which currently are difficult to process - core collection functions would come handy here. One is clojure.core/set?
to check, if a property value is a single value or set.
Proposal:
allow all or at least all collection-related functions from clojure.core
(or other namespaces) to be used in advanced queries, similar to Datomic:
Datomic provides the following built-in expression functions and predicates:
[…]
All of the functions from the clojure.core namespace of Clojure, except eval.
Function names outside clojure.core need to be fully qualified. Datomic will automatically require the namespace for a query function.