document dsl rules for advance queries
- 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
```clojure
: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
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