Created
January 31, 2022 00:11
-
-
Save cldwalker/f2b1ac0d8875cc046b6d0ea67326ed83 to your computer and use it in GitHub Desktop.
logseq page-property-join-example-query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- #+BEGIN_QUERY | |
{:title "Query joining page properties with a rule" | |
:query [:find (pull ?things [*]) | |
:in $ ?region % | |
:where | |
(page-name-property ?_b ?country :region ?region) | |
(page-name-property ?_b2 ?author :country-of-origin ?country) | |
(page-name-property ?things ?_name :authored-by ?author)] | |
:inputs ["Middle East" | |
[[(page-name-property ?b ?block-name ?property-name ?property-value) | |
[?b :block/original-name ?block-name] | |
[?b :block/properties ?p] | |
[(get ?p ?property-name) ?property-values] | |
[(contains? ?property-values ?property-value)]]]] | |
} | |
#+END_QUERY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment