much better sorting.
This commit is contained in:
@@ -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"))))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user