Getting closer to datomic cloud

This commit is contained in:
2023-03-18 20:07:34 -07:00
parent bd658906b5
commit 78519663ac
17 changed files with 299 additions and 177 deletions

View File

@@ -8,7 +8,7 @@
[auto-ap.time :as atime]
[clj-time.coerce :as coerce]
[clojure.string :as str]
[datomic.api :as d]
[datomic.client.api :as dc]
[hiccup2.core :as hiccup]))
(defn tx-rows->changes [history]
@@ -123,13 +123,13 @@
(get params "entity-id")
(get form-params "entity-id")))
history (->>
(d/q '[:find ?a2 ?v (pull ?tx [:db/txInstant :audit/user :db/id]) ?ad
(dc/q '[:find ?a2 ?v (pull ?tx [:db/txInstant :audit/user :db/id]) ?ad
:in $ $$ ?i
:where
[$$ ?i ?a ?v ?tx ?ad]
[$ ?a :db/ident ?a2]]
(d/db conn)
(d/history (d/db conn))
(dc/db conn)
(dc/history (dc/db conn))
entity-id )
tx-rows->changes
(sort-by (comp :db/id first))
@@ -166,7 +166,7 @@
:request request)
(try
(let [entity-id (Long/parseLong entity-id)
data (d/pull (d/db conn)
data (dc/pull (dc/db conn)
'[*]
entity-id)]