mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 10:26:35 +00:00
hook up DB pipeline
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
(doseq [block blocks-to-add]
|
||||
(.add indice (bean/->js block)))))
|
||||
indice)))
|
||||
(transact-pages! [_this _data] nil) ;; Page index is not available with fuse.js until sufficient performance benchmarking
|
||||
(truncate-blocks! [_this]
|
||||
(swap! indices assoc-in [repo :blocks] nil))
|
||||
(remove-db! [_this]
|
||||
|
||||
@@ -20,6 +20,12 @@
|
||||
:page page
|
||||
:content content})))
|
||||
|
||||
;; TODO Junyi: Finalize index code
|
||||
(defn page->index
|
||||
"Convert a page name to the index for searching (page content level)"
|
||||
[page-name]
|
||||
:no-op)
|
||||
|
||||
(defn build-blocks-indice
|
||||
;; TODO: Remove repo effects fns further up the call stack. db fns need standardization on taking connection
|
||||
#_:clj-kondo/ignore
|
||||
@@ -29,12 +35,9 @@
|
||||
(remove nil?)
|
||||
(bean/->js)))
|
||||
|
||||
;; TODO Junyi: Finalize index code
|
||||
(defn build-pages-indice
|
||||
;; TODO: Remove repo effects fns further up the call stack. db fns need standardization on taking connection
|
||||
#_:clj-kondo/ignore
|
||||
(defn build-pages-indice
|
||||
[repo]
|
||||
(->> (db/get-all-page-contents)
|
||||
(->> (db/get-all-pages repo)
|
||||
(map page->index)
|
||||
(remove nil?)
|
||||
(bean/->js)))
|
||||
|
||||
Reference in New Issue
Block a user