From a990c2b092ae6192ab548951f6ad154c6b597578 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Fri, 21 Jun 2013 10:56:25 +1000 Subject: Return records on update, return just a count on delete (jdbc) --- src/clojure_sql/jdbc.clj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/clojure_sql/jdbc.clj') diff --git a/src/clojure_sql/jdbc.clj b/src/clojure_sql/jdbc.clj index 8611336..45b1839 100644 --- a/src/clojure_sql/jdbc.clj +++ b/src/clojure_sql/jdbc.clj @@ -9,4 +9,6 @@ :select (jdbc/with-query-results results query (vec results)) :insert (jdbc/do-prepared-return-keys (first query) (next query)) - (jdbc/do-prepared (first query) (next query))))))) + :update (jdbc/do-prepared-return-keys (first query) (next query)) + :delete (first (jdbc/do-prepared (first query) (next query))) + (assert false (str "Unknown query type: " type))))))) -- cgit v1.2.3