adding invoice db layer

This commit is contained in:
Bryce Covert
2017-12-08 07:48:04 -08:00
parent 252a6c5f9b
commit ef4dd52a42
3 changed files with 63 additions and 41 deletions

View File

@@ -0,0 +1,12 @@
(ns auto-ap.db.invoices
(:require [clojure.java.jdbc :as j]
[auto-ap.db.utils :use [clj->db db->clj conn]]))
(defn insert-multi! [rows]
(j/insert-multi! conn
:invoices
(map clj->db rows)))
(defn get-all []
(map db->clj (j/query conn "SELECT * FROM invoices")))