partway through transaction rules
This commit is contained in:
@@ -367,3 +367,19 @@
|
||||
(require '[mount.core :as mount])
|
||||
(require '[auto-ap.server])
|
||||
(mount/start-without #'auto-ap.server/jetty))
|
||||
|
||||
(defn entity-history [i]
|
||||
(vec (sort-by first (d/query
|
||||
{:query {:find ['?tx '?z '?v ]
|
||||
:in ['?i '$]
|
||||
:where ['[?i ?a ?v ?tx ?ad]
|
||||
'[?a :db/ident ?z]
|
||||
'[(= ?ad true)]]}
|
||||
:args [i (d/history (d/db (d/connect uri)))]}))))
|
||||
|
||||
(defn tx-detail [i]
|
||||
(map (juxt :e #(d/ident (d/db (d/connect uri)) (:a %)) :v)
|
||||
(:data (first
|
||||
(d/tx-range (d/log (d/connect uri))
|
||||
i
|
||||
(inc i))))))
|
||||
|
||||
Reference in New Issue
Block a user