🎉 Add insert-multi helper on db namespace.

This commit is contained in:
Andrey Antukh 2021-05-04 15:13:44 +02:00 committed by Andrés Moya
parent 8ad8196d70
commit 77c2a98304
2 changed files with 12 additions and 0 deletions

View file

@ -32,6 +32,11 @@
(assoc :suffix "ON CONFLICT DO NOTHING"))]
(sql/for-insert table key-map opts))))
(defn insert-multi
[table cols rows opts]
(let [opts (merge default-opts opts)]
(sql/for-insert-multi table cols rows opts)))
(defn select
([table where-params]
(select table where-params nil))