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,11 +6,12 @@
apply-sort-3
conn
merge-query
pull-many]]
pull-many
query2]]
[auto-ap.datomic.accounts :as d-accounts]
[auto-ap.graphql.utils :refer [limited-clients]]
[clj-time.coerce :as c]
[datomic.client.api :as dc]))
[datomic.api :as dc]))
(defn raw-graphql-ids [db args]
(let [query (cond-> {:query {:find []
@@ -126,8 +127,7 @@
true
(merge-query {:query {:find ['?sort-default '?e] :where ['[?e :journal-entry/date ?sort-default]]}}))]
(->> query
(dc/q)
(->> (query2 query)
(apply-sort-3 (update args :sort conj {:sort-key "default-2" :asc true}))
(apply-pagination args))))
@@ -168,11 +168,10 @@
(defn filter-ids [ids]
(if ids
(->> {:query {:find ['?e]
:in ['$ '[?e ...]]
:where ['[?e :journal-entry/date]]}
:args [(dc/db conn) ids]}
(dc/q)
(->> (dc/q {:find ['?e]
:in ['$ '[?e ...]]
:where ['[?e :journal-entry/date]]}
(dc/db conn) ids)
(map first)
vec)
[]))