Files
logseq/pages/Datomic.md
T

34 lines
920 B
Markdown

tags:: #STAR
-
- #References
- [Datomic Queries and Rules | Datomic](https://docs.datomic.com/pro/query/query.html)
- [logseq/deps/db/src/logseq/db/schema.cljs at master · logseq/logseq (github.com)](https://github.com/logseq/logseq/blob/master/deps/db/src/logseq/db/schema.cljs)
-
- #STAR
- #+BEGIN_QUERY
{:title "All pages have a *STAR* tag"
:query [:find ?name
:in $ ?tag
:where
[?t :block/name ?tag]
[?p :block/tags ?t]
[?p :block/name ?name]]
:inputs ["STAR"]
}
#+END_QUERY
- ---
- #+BEGIN_QUERY
{:title "All pages starting with the string PAPERS"
:query [:find (pull ?p [*])
:where
[?p :block/name "PAPERS/msr11-dataset"]]}
#+END_QUERY
- #+BEGIN_QUERY
{:title [:h2 "STAR list"]
:query [:find (pull ?b [*])
:where
(property ?b :tags "STAR")]}
#+END_QUERY
-
- (starts-with ?page-name "PAPERS/")]