Merge branch 'feat/db' into feat/property-default-value

This commit is contained in:
Tienson Qin
2024-11-25 14:39:11 +08:00
committed by GitHub
36 changed files with 774 additions and 325 deletions

View File

@@ -193,14 +193,14 @@
;; Counts
;; Includes journals as property values e.g. :logseq.task/deadline
(is (= 22 (count (d/q '[:find ?b :where [?b :block/type "journal"]] @conn))))
(is (= 22 (count (d/q '[:find ?b :where [?b :block/tags :logseq.class/Journal]] @conn))))
(is (= 23 (count (d/q '[:find ?b :where [?b :block/type "journal"]] @conn))))
(is (= 23 (count (d/q '[:find ?b :where [?b :block/tags :logseq.class/Journal]] @conn))))
(is (= 4 (count (d/q '[:find ?b :where [?b :block/tags :logseq.class/Task]] @conn))))
(is (= 3 (count (d/q '[:find ?b :where [?b :block/tags :logseq.class/Query]] @conn))))
;; Don't count pages like url.md that have properties but no content
(is (= 9
(is (= 10
(count (->> (d/q '[:find [(pull ?b [:block/title :block/type]) ...]
:where [?b :block/title] [_ :block/page ?b] (not [?b :logseq.property/built-in?])] @conn)
(filter ldb/internal-page?))))