ledger final fixes
This commit is contained in:
@@ -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)
|
||||
[]))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user