Skip to content

Instantly share code, notes, and snippets.

@logseq-cldwalker
Last active March 12, 2022 18:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save logseq-cldwalker/796202d55897fd34ea3d8c3bb3401ae0 to your computer and use it in GitHub Desktop.
Save logseq-cldwalker/796202d55897fd34ea3d8c3bb3401ae0 to your computer and use it in GitHub Desktop.
Examples of rules that can be used from advanced query
$ node static/tests.js -r dsl |grep EXAMPLE: | grep -v -E 'and|or|not' | uniq
EXAMPLE: (property ?b :prop-a "val-a")
EXAMPLE: (property ?b :prop-b "val-b")
EXAMPLE: (property ?b :prop-c "page c")
EXAMPLE: (property ?b :prop-c "page b")
EXAMPLE: (property ?b :prop-c "page c")
EXAMPLE: (property ?b :prop-b "val-b")
EXAMPLE: (property ?b :prop-num 2000)
EXAMPLE: (property ?b :prop-linked-num 3000)
EXAMPLE: (property ?b :prop-d "no-space-link")
EXAMPLE: (has-property ?b :prop-d)
EXAMPLE: (has-page-property ?p :parent)
EXAMPLE: (page-property ?p :parent "child page 1")
EXAMPLE: (page-property ?p :parent "child-no-space")
EXAMPLE: (page-property ?p :parent "child page 1")
EXAMPLE: (page-property ?p :parent "child page 2")
EXAMPLE: (page-property ?p :parent "child page 1")
EXAMPLE: (page-property ?p :parent "child page 2")
EXAMPLE: (page-property ?p :foo "bar")
EXAMPLE: (task ?b #{"NOW"})
EXAMPLE: (task ?b #{"LATER"})
EXAMPLE: (task ?b #{"NOW" "LATER"})
EXAMPLE: (task ?b #{"NOW"})
EXAMPLE: (task ?b #{"LATER"})
EXAMPLE: (task ?b #{"TODO"})
EXAMPLE: nil
EXAMPLE: (task ?b #{"TODO"})
EXAMPLE: nil
EXAMPLE: (task ?b #{"DONE"})
EXAMPLE: (page-ref ?b "page 1")
EXAMPLE: (task ?b #{"NOW" "LATER"})
EXAMPLE: (page-ref ?b "page 1")
EXAMPLE: (page-ref ?b "page 2")
EXAMPLE: (task ?b #{"NOW" "LATER" "DONE"})
EXAMPLE: (page-ref ?b "page 1")
EXAMPLE: (page-tags ?p #{"page-tag-1"})
EXAMPLE: (page-tags ?p #{"page-tag-2"})
EXAMPLE: (page-tags ?p #{"page-tag-1" "page-tag-2"})
EXAMPLE: (all-page-tags ?p)
EXAMPLE: (block-content ?b "Hit")
EXAMPLE: (block-content ?b "miss")
EXAMPLE: (page ?b "page1")
EXAMPLE: (page ?b "nope")
EXAMPLE: (namespace ?p "ns1")
EXAMPLE: (namespace ?p "blarg")
EXAMPLE: (page-ref ?b "page 2")
EXAMPLE: (page-ref ?b "blarg")
EXAMPLE: (page-ref ?b "tag1")
EXAMPLE: (page-ref ?b "page 2")
EXAMPLE: (page-ref ?b "tag2")
EXAMPLE: (page-ref ?b "page 2")
EXAMPLE: (page ?b "page1")
EXAMPLE: (page-ref ?b "page 2")
EXAMPLE: (task ?b #{"NOW" "LATER" "DONE"})
EXAMPLE: (between ?b 20201226 20220310)
EXAMPLE: (task ?b #{"NOW" "LATER" "DONE"})
EXAMPLE: (between ?b 20201227 20201228)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment