|
|
@@ -2,6 +2,7 @@
|
|
|
"listen datascript changes, infer operations from the db tx-report"
|
|
|
(:require [frontend.worker.db-listener :as db-listener]
|
|
|
[frontend.worker.rtc.client-op :as client-op]
|
|
|
+ [frontend.worker.rtc.debug-log :as rtc-debug-log]
|
|
|
[frontend.worker.rtc.gen-client-op :as gen-client-op]))
|
|
|
|
|
|
(comment
|
|
|
@@ -12,9 +13,10 @@
|
|
|
(defmethod db-listener/listen-db-changes :gen-rtc-ops
|
|
|
[_
|
|
|
{:keys [repo same-entity-datoms-coll id->same-entity-datoms]}
|
|
|
- {:keys [_tx-data tx-meta db-before db-after]}]
|
|
|
+ {:keys [tx-data tx-meta db-before db-after]}]
|
|
|
(when (and (client-op/rtc-db-graph? repo)
|
|
|
(:persist-op? tx-meta true))
|
|
|
+ (rtc-debug-log/log-tx! repo tx-data tx-meta)
|
|
|
(let [e->a->add?->v->t (update-vals
|
|
|
id->same-entity-datoms
|
|
|
gen-client-op/entity-datoms=>a->add?->v->t)
|