added ability to manually insert transactions
This commit is contained in:
@@ -8,10 +8,13 @@
|
||||
|
||||
(defn upsert! [row]
|
||||
(j/db-do-prepared (get-conn)
|
||||
(sql/format (-> (helpers/insert-into :transactions)
|
||||
(helpers/values [row])
|
||||
(postgres-helpers/upsert (-> (postgres-helpers/on-conflict :id)
|
||||
(postgres-helpers/do-update-set :post_date :status :check_id)))))))
|
||||
(doto (sql/format (-> (helpers/insert-into :transactions)
|
||||
(helpers/values [row])
|
||||
(postgres-helpers/upsert (-> (postgres-helpers/on-conflict :id)
|
||||
|
||||
(postgres-helpers/do-update-set :post_date :status :check_id)
|
||||
(helpers/where [:<> :EXCLUDED.check_id nil])))))
|
||||
println)))
|
||||
|
||||
(def base-query (sql/build :select :*
|
||||
:from :transactions))
|
||||
|
||||
Reference in New Issue
Block a user