enhance: prefer ldb/transact! than d/transact!

This commit is contained in:
Tienson Qin
2025-10-13 19:03:11 +08:00
parent 787372c174
commit 7ed7fb4f31
17 changed files with 58 additions and 52 deletions

View File

@@ -12,6 +12,7 @@
[datascript.core :as d]
[logseq.common.config :as common-config]
[logseq.common.graph :as common-graph]
[logseq.db :as ldb]
[logseq.db.common.sqlite-cli :as sqlite-cli]
[logseq.db.frontend.asset :as db-asset]
[logseq.graph-parser.exporter :as gp-exporter]
@@ -22,7 +23,7 @@
[promesa.core :as p]))
(def tx-queue (atom cljs.core/PersistentQueue.EMPTY))
(def original-transact! d/transact!)
(def original-transact! ldb/transact!)
(defn dev-transact! [conn tx-data tx-meta]
(swap! tx-queue (fn [queue]
(let [new-queue (conj queue {:tx-data tx-data :tx-meta tx-meta})]