Merge branch 'feat/db' into feat/datascript-storage

This commit is contained in:
Tienson Qin
2023-12-06 01:10:23 +08:00
106 changed files with 2817 additions and 1312 deletions

View File

@@ -457,11 +457,12 @@ tags: [[other]]
(dsl-query "(or [[tag2]] [[page 3]])")))
"OR query with nonexistent page should return meaningful results")
(is (= ["b1 [[page 1]] #tag2" "foo:: bar" "b3"]
(is (= (set ["b1 [[page 1]] #tag2" "foo:: bar" "b3"])
(->> (dsl-query "(not [[page 2]])")
;; Only filter to page1 to get meaningful results
(filter #(= "page1" (get-in % [:block/page :block/name])))
(map (comp str/trimr :block/content))))
(map (comp str/trimr :block/content))
(set)))
"NOT query")))
(deftest nested-page-ref-queries