mirror of
https://github.com/logseq/logseq.git
synced 2026-05-23 12:14:06 +00:00
fix: use transit instead of ->clj&->js
to avoid some data serialization issues. e.g. uuid becomes a map
This commit is contained in:
@@ -178,8 +178,7 @@
|
||||
(<list-db [_this]
|
||||
(when-let [^js sqlite @*worker]
|
||||
(-> (.listDB sqlite)
|
||||
(p/then (fn [result]
|
||||
(bean/->clj result)))
|
||||
(p/then ldb/read-transit-str)
|
||||
(p/catch sqlite-error-handler))))
|
||||
|
||||
(<unsafe-delete [_this repo]
|
||||
|
||||
@@ -473,7 +473,7 @@
|
||||
(listDB
|
||||
[_this]
|
||||
(p/let [dbs (<list-all-dbs)]
|
||||
(bean/->js dbs)))
|
||||
(ldb/write-transit-str dbs)))
|
||||
|
||||
(createOrOpenDB
|
||||
[_this repo opts-str]
|
||||
@@ -910,7 +910,8 @@
|
||||
|
||||
(dangerousRemoveAllDbs
|
||||
[this repo]
|
||||
(p/let [dbs (.listDB this)]
|
||||
(p/let [r (.listDB this)
|
||||
dbs (ldb/read-transit-str r)]
|
||||
(p/all (map #(.unsafeUnlinkDB this (:name %)) dbs)))))
|
||||
|
||||
(defn- rename-page!
|
||||
|
||||
Reference in New Issue
Block a user