started adding graphql
This commit is contained in:
@@ -15,3 +15,6 @@
|
||||
(defn upsert [id data]
|
||||
(j/update! (get-conn) :companies (clj->db data) ["id = ?" (Integer/parseInt id)] )
|
||||
(parse (first (j/query (get-conn) ["SELECT * FROM companies WHERE id = ?" (Integer/parseInt id)]))))
|
||||
|
||||
(defn get-by-id [id]
|
||||
(parse (first (j/query (get-conn) ["SELECT * FROM companies WHERE id = ?" id]))))
|
||||
|
||||
Reference in New Issue
Block a user