fixed warnings.
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
(ns auto-ap.datomic.invoices
|
||||
(:require [datomic.api :as d]
|
||||
[auto-ap.datomic :refer [uri merge-query apply-pagination apply-sort-3 add-sorter-fields conn]]
|
||||
[auto-ap.graphql.utils :refer [limited-clients]]
|
||||
[clojure.set :refer [rename-keys]]
|
||||
[clj-time.coerce :as coerce]
|
||||
[auto-ap.time-utils :refer [next-dom]]
|
||||
[clj-time.core :as time]
|
||||
[auto-ap.datomic.vendors :as d-vendors]
|
||||
[clojure.tools.logging :as log]
|
||||
[auto-ap.datomic.accounts :as d-accounts]))
|
||||
(:require
|
||||
[auto-ap.datomic
|
||||
:refer [add-sorter-fields apply-pagination apply-sort-3 conn merge-query uri]]
|
||||
[auto-ap.datomic.accounts :as d-accounts]
|
||||
[auto-ap.datomic.vendors :as d-vendors]
|
||||
[auto-ap.graphql.utils :refer [limited-clients]]
|
||||
[auto-ap.time-utils :refer [next-dom]]
|
||||
[clj-time.coerce :as coerce]
|
||||
[clj-time.core :as time]
|
||||
[clojure.set :refer [rename-keys]]
|
||||
[datomic.api :as d]))
|
||||
|
||||
(def default-read '[*
|
||||
{:invoice/client [:client/name :db/id :client/locations :client/code]}
|
||||
@@ -41,7 +42,7 @@
|
||||
(->> (cond-> {:query {:find []
|
||||
:in ['$]
|
||||
:where ['[?e :invoice/client]]}
|
||||
:args [(d/db (d/connect uri))]}
|
||||
:args [db]}
|
||||
|
||||
(:exact-match-id args)
|
||||
(merge-query {:query {:in ['?e]
|
||||
@@ -162,7 +163,7 @@
|
||||
(apply-pagination args))))
|
||||
|
||||
|
||||
(defn graphql-results [ids db args]
|
||||
(defn graphql-results [ids db _]
|
||||
(let [results (->> (d/pull-many db default-read ids)
|
||||
(group-by :db/id))
|
||||
|
||||
@@ -218,10 +219,6 @@
|
||||
(d/pull default-read id)
|
||||
(<-datomic)))
|
||||
|
||||
(defn update [update]
|
||||
@(d/transact (d/connect uri) [update])
|
||||
(get-by-id (:db/id update) ))
|
||||
|
||||
(defn get-multi [ids]
|
||||
(map <-datomic
|
||||
(-> (d/db (d/connect uri))
|
||||
|
||||
Reference in New Issue
Block a user