ledger final fixes

This commit is contained in:
Bryce Covert
2020-09-30 20:54:32 -07:00
parent 45f4ba4e03
commit 3ace024437
5 changed files with 70 additions and 13 deletions

View File

@@ -2,7 +2,7 @@
(:require [datomic.api :as d]
[auto-ap.graphql.utils :refer [->graphql limited-clients]]
[auto-ap.utils :refer [dollars-0?]]
[auto-ap.datomic :refer [merge-query apply-sort-3 apply-pagination add-sorter-fields]]
[auto-ap.datomic :refer [merge-query apply-sort-3 apply-pagination add-sorter-fields conn]]
[auto-ap.datomic :refer [uri]]
[clj-time.coerce :as c]
[clj-time.core :as time]))
@@ -141,7 +141,7 @@
(map first))))
(defn get-graphql [args]
(let [db (d/db (d/connect uri))
(let [db (d/db conn)
{ids-to-retrieve :ids matching-count :count} (raw-graphql-ids db args)]
[(->> (graphql-results ids-to-retrieve db args))
@@ -149,9 +149,17 @@
#_(get-graphql {})
(defn filter-ids [ids]
(if ids
(->> {:query {:find ['?e]
:in ['$ '[?e ...]]
:where ['[?e :journal-entry/date]]}
:args [(d/db conn) ids]}
(d/query)
(map first)
vec)
[]))