Migrates back to datomic on-prem
This commit is contained in:
@@ -6,12 +6,13 @@
|
||||
apply-sort-3
|
||||
conn
|
||||
merge-query
|
||||
pull-many]]
|
||||
pull-many
|
||||
query2]]
|
||||
[auto-ap.graphql.utils :refer [limited-clients]]
|
||||
[clj-time.coerce :as c]
|
||||
[datomic.client.api :as dc]
|
||||
[clojure.set :refer [rename-keys]]
|
||||
[clojure.tools.logging :as log]))
|
||||
[clojure.tools.logging :as log]
|
||||
[datomic.api :as dc]))
|
||||
|
||||
(defn <-datomic [result]
|
||||
(-> result
|
||||
@@ -154,8 +155,7 @@
|
||||
|
||||
|
||||
(log/info query)
|
||||
(cond->> query
|
||||
true (dc/q)
|
||||
(cond->> (query2 query)
|
||||
true (apply-sort-3 (assoc args :default-asc? false))
|
||||
true (apply-pagination args)))))
|
||||
|
||||
@@ -178,11 +178,10 @@
|
||||
|
||||
(defn filter-ids [ids]
|
||||
(if ids
|
||||
(->> {:query {:find ['?e]
|
||||
:in ['$ '[?e ...]]
|
||||
:where ['[?e :payment/date]]}
|
||||
:args [(dc/db conn) ids]}
|
||||
(dc/q)
|
||||
(->> (dc/q {:find ['?e]
|
||||
:in ['$ '[?e ...]]
|
||||
:where ['[?e :payment/date]]}
|
||||
(dc/db conn) ids)
|
||||
(map first)
|
||||
vec)
|
||||
[]))
|
||||
|
||||
Reference in New Issue
Block a user