Yodlee exists as datomic entities!
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
(defn cleanse [e]
|
||||
(-> e
|
||||
(assoc :client/yodlee-provider-accounts (get e :yodlee-provider-account/_client))
|
||||
(update :client/location-matches
|
||||
(fn [lms]
|
||||
(map #(assoc % :location-match/match (first (:location-match/matches %))) lms)))
|
||||
@@ -20,7 +21,9 @@
|
||||
(defn get-all []
|
||||
(->> (d/q '[:find (pull ?e [*
|
||||
{:client/address [*]}
|
||||
{:client/bank-accounts [* {:bank-account/type [*]}]}])
|
||||
{:client/bank-accounts [* {:bank-account/type [*]
|
||||
:bank-account/yodlee-account [:yodlee-account/name :yodlee-account/id :yodlee-account/number]}]}
|
||||
{:yodlee-provider-account/_client [*]}])
|
||||
:where [?e :client/name]]
|
||||
(d/db (d/connect uri)))
|
||||
(map first)
|
||||
@@ -29,7 +32,10 @@
|
||||
))
|
||||
(defn get-by-id [id]
|
||||
(->>
|
||||
(d/query (-> {:query {:find ['(pull ?e [* {:client/bank-accounts [* {:bank-account/type [*]}]}])]
|
||||
(d/query (-> {:query {:find ['(pull ?e [*
|
||||
{:client/bank-accounts [* {:bank-account/type [*]
|
||||
:bank-account/yodlee-account [:yodlee-account/name :yodlee-account/id :yodlee-account/number]}]}
|
||||
{:yodlee-provider-account/_client [*]}])]
|
||||
:in ['$ '?e]
|
||||
:where [['?e]]}
|
||||
:args [(d/db (d/connect uri)) id]}
|
||||
|
||||
Reference in New Issue
Block a user