mirror of
https://github.com/logseq/logseq.git
synced 2026-05-23 12:14:06 +00:00
fix: remove unused db.sqlite related fns
- remove sqlite-db/close! as its not used and didn't make sense to be used in other electron ns - remove sqlite-db/connections atom as its not needed - remove read-graph as its not necessary - rename cli.persist-graph as its primary purpose has changed - update effected scripts
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
[logseq.db.sqlite.util :as sqlite-util]
|
||||
[logseq.db.sqlite.create-graph :as sqlite-create-graph]
|
||||
[logseq.db.frontend.property.util :as db-property-util]
|
||||
[logseq.outliner.cli.persist-graph :as persist-graph]
|
||||
[logseq.outliner.cli.pipeline :as cli-pipeline]
|
||||
[logseq.db :as ldb]
|
||||
[clojure.string :as string]
|
||||
[datascript.core :as d]
|
||||
@@ -34,10 +34,9 @@
|
||||
transacts initial data"
|
||||
[dir db-name]
|
||||
(fs/mkdirSync (node-path/join dir db-name) #js {:recursive true})
|
||||
(sqlite-db/open-db! dir db-name)
|
||||
;; Same order as frontend.db.conn/start!
|
||||
(let [conn (ldb/start-conn :create-default-pages? false)]
|
||||
(persist-graph/add-listener conn db-name)
|
||||
(let [conn (sqlite-db/open-db! dir db-name)]
|
||||
(cli-pipeline/add-listener conn)
|
||||
(ldb/create-default-pages! conn {:db-graph? true})
|
||||
(setup-init-data conn)
|
||||
conn))
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
|
||||
(defn- publish-db-graph [static-dir graph-dir output-path]
|
||||
(let [db-name (node-path/basename graph-dir)
|
||||
_ (sqlite-db/open-db! (node-path/dirname graph-dir) db-name)
|
||||
conn (sqlite-cli/read-graph db-name)
|
||||
conn (sqlite-db/open-db! (node-path/dirname graph-dir) db-name)
|
||||
repo-config (-> (d/q '[:find ?content
|
||||
:where [?b :file/path "logseq/config.edn"] [?b :file/content ?content]]
|
||||
@conn)
|
||||
|
||||
Reference in New Issue
Block a user