chore: remove unused queries

This commit is contained in:
Tienson Qin
2023-11-29 19:04:27 +08:00
parent f9307d82f3
commit b2afb5b861
2 changed files with 2 additions and 21 deletions

View File

@@ -29,8 +29,8 @@
entity pull pull-many transact! get-key-value]
[frontend.db.model
blocks-count blocks-count-cache delete-blocks get-pre-block
delete-files delete-pages-by-files get-all-block-contents get-all-block-avets get-all-tagged-pages get-single-block-contents
delete-blocks get-pre-block
delete-files delete-pages-by-files get-all-block-contents get-all-tagged-pages get-single-block-contents
get-all-templates get-block-and-children get-block-by-uuid get-block-children sort-by-left
get-block-parent get-block-parents parents-collapsed? get-block-referenced-blocks get-all-referenced-blocks-uuid
get-block-immediate-children get-block-page

View File

@@ -1313,19 +1313,6 @@ independent of format as format specific heading characters are stripped"
(sort-by :block/name)
(first))))
(defonce blocks-count-cache (atom nil))
(defn blocks-count
([]
(blocks-count true))
([cache?]
(if (and cache? @blocks-count-cache)
@blocks-count-cache
(when-let [db (conn/get-db)]
(let [n (count (d/datoms db :avet :block/uuid))]
(reset! blocks-count-cache n)
n)))))
(defn get-all-referenced-blocks-uuid
"Get all uuids of blocks with any back link exists."
[]
@@ -1356,12 +1343,6 @@ independent of format as format specific heading characters are stripped"
(map get-single-block-contents)
(remove nil?))))
(defn get-all-block-avets
[]
(when-let [db (conn/get-db)]
(->> (d/datoms db :avet :block/uuid))))
;; Deprecated?
(defn delete-blocks
[repo-url files _delete-page?]
(when (seq files)