summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@clearboxsystems.com.au>2013-06-21 10:56:25 +1000
committerCarlo Zancanaro <carlo@clearboxsystems.com.au>2013-06-21 10:56:25 +1000
commita990c2b092ae6192ab548951f6ad154c6b597578 (patch)
tree08b1c96251dea7c4da79b889f9dadd2657d6142d
parentfb946311da111e2a422a938b0b8720c3ecf3341c (diff)
Return records on update, return just a count on delete (jdbc)
-rw-r--r--src/clojure_sql/jdbc.clj4
1 files changed, 3 insertions, 1 deletions
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)))))))