diff --git a/deps/graph-parser/src/logseq/graph_parser/test/docs_graph_helper.cljs b/deps/graph-parser/src/logseq/graph_parser/test/docs_graph_helper.cljs index a4051d1efc..2e1a51b246 100644 --- a/deps/graph-parser/src/logseq/graph_parser/test/docs_graph_helper.cljs +++ b/deps/graph-parser/src/logseq/graph_parser/test/docs_graph_helper.cljs @@ -68,6 +68,15 @@ db) ffirst)) +(defn- get-counts-for-common-attributes [db] + (->> [:block/scheduled :block/priority :block/deadline :block/collapsed? + :block/repeated?] + (map (fn [attr] + [attr + (ffirst (d/q [:find (list 'count '?b) :where ['?b attr]] + db))])) + (into {}))) + (defn- query-assertions [db graph-dir files] (testing "Query based stats" @@ -121,13 +130,7 @@ :block/deadline 1 :block/collapsed? 80 :block/repeated? 1} - (->> [:block/scheduled :block/priority :block/deadline :block/collapsed? - :block/repeated?] - (map (fn [attr] - [attr - (ffirst (d/q [:find (list 'count '?b) :where ['?b attr]] - db))])) - (into {}))) + (get-counts-for-common-attributes db)) "Counts for blocks with common block attributes") (let [no-name (->> (d/q '[:find (pull ?n [*]) :where [?b :block/namespace ?n]] db) diff --git a/deps/persist-db/src/index.js b/deps/persist-db/src/index.js index 937593e29b..2f03db2e8e 100644 --- a/deps/persist-db/src/index.js +++ b/deps/persist-db/src/index.js @@ -233,7 +233,7 @@ const SQLiteDB = { }, async fetchAllPages(dbName) { - console.log("featch all pages"); + console.log("fetch all pages"); let db = dbMap[dbName]; if (!db) { await this.newDB(dbName); @@ -369,4 +369,3 @@ onconnect = function (event) { const port = event.ports[0]; Comlink.expose(SQLiteDB, port); }; - diff --git a/typos.toml b/typos.toml index 4ec321e7c2..55d41ea86e 100644 --- a/typos.toml +++ b/typos.toml @@ -12,5 +12,6 @@ BA = "BA" fo = "fo" aks = "aks" Mannor = "Mannor" +nd = "nd" [files] extend-exclude = ["resources/*", "src/resources/*"]