fix: use transit instead of ->clj&->js

to avoid some data serialization issues.
e.g. uuid becomes a map
This commit is contained in:
rcmerci
2025-02-06 17:26:50 +08:00
parent 3dddc4323a
commit 08a45dcea8
2 changed files with 4 additions and 4 deletions

View File

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

View File

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