much better sorting.

This commit is contained in:
Bryce Covert
2020-04-25 16:21:36 -07:00
parent a8736f351e
commit d799fc469d
17 changed files with 294 additions and 219 deletions

View File

@@ -5,7 +5,7 @@
[clj-time.coerce :as c]
[clj-time.core :as t]))
(defn exclude-until-date [client end]
(defn mark-until-date [client end]
(let [conn (d/connect uri)]
(doseq [p (->>
(d/query {:query {:find '[?e]
@@ -47,5 +47,22 @@
@(d/transact conn p)
(println "process 100"))))
(defn unapprove-all []
(let [conn (d/connect uri)]
(doseq [p (->>
(d/query {:query {:find '[?e]
:in '[$ ]
:where ['[?e :transaction/date ?d ]]}
:args [(d/db conn)]})
(mapv first)
(mapv (fn [i]
{:db/id i
:transaction/approval-status :transaction-approval-status/unapproved}))
(partition-all 100))]
@(d/transact conn p)
(println "process 100"))))