Fix typos and get fn back to a reasonable size

This commit is contained in:
Gabriel Horner
2023-08-22 08:54:20 -04:00
parent c8b88c9d8f
commit ef03f12da7
3 changed files with 12 additions and 9 deletions

View File

@@ -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)

View File

@@ -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);
};

View File

@@ -12,5 +12,6 @@ BA = "BA"
fo = "fo"
aks = "aks"
Mannor = "Mannor"
nd = "nd"
[files]
extend-exclude = ["resources/*", "src/resources/*"]