document dsl rules for advance queries

未关闭
#69 3 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
42/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
停滞
技术栈
clojure
领域
documentation

调研方向

从链接文档页面中的 Advanced Queries 部分开始,将其中的示例与 deps/db/src/logseq/db/rules.cljc 中的 :between 规则进行比较。明确受影响规则在文档中的含义,并修正示例,使其与规则定义一致。完成的标准是这些规则已有文档说明,且引用的查询不再具有误导性。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Clojure
星标
192
派生
95
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

logseq/docs 的其他 Issue

查看 logseq/docs 的全部 Issue

相似的 Issue

更多 Clojure Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。