Migrates back to datomic on-prem

This commit is contained in:
2023-04-29 07:12:51 -07:00
parent aca8f7c92c
commit b2ad7790cf
88 changed files with 2289 additions and 2286 deletions

View File

@@ -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)
[]))