logseq / logseq/docs

document dsl rules for advance queries

Open
#69 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Clojure
Stars
192
Forks
95
PR merge metrics
No merged PRs in 30d

Description

I was trying to understand what's the actual meaning of between, but I can't find the documentation. It seems to be the task's journal date, but these queries made me think it's the referenced journal date: (Tasks referencing due dates ...)

https://github.com/logseq/docs/blob/cdbec0f9025507994559e5fb8aa607eae08006e1/pages/Advanced%20Queries.md#L177-L204

Then I found the definition here https://github.com/logseq/logseq/blob/master/deps/db/src/logseq/db/rules.cljc

   :between
   '[(between ?b ?start ?end)
     [?b :block/page ?p]
     [?p :block/journal? true]
     [?p :block/journal-day ?d]
     [(>= ?d ?start)]
     [(<= ?d ?end)]]

So it's indeed the task's journal date and the queries above are wrongly explained. I think it might be better to add documentation for these rules, and fixup the examples.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Advanced Queries section in the linked docs page and compare its examples with the :between rule in deps/db/src/logseq/db/rules.cljc. Clarify the documented meaning of the affected rules and correct the examples so they match the rule definitions. Done means the rules are documented and the referenced queries are no longer misleading.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.