diff options
author | Carlo Zancanaro <carlo@clearboxsystems.com.au> | 2013-06-21 10:56:25 +1000 |
---|---|---|
committer | Carlo Zancanaro <carlo@clearboxsystems.com.au> | 2013-06-21 10:56:25 +1000 |
commit | a990c2b092ae6192ab548951f6ad154c6b597578 (patch) | |
tree | 08b1c96251dea7c4da79b889f9dadd2657d6142d /src/clojure_sql | |
parent | fb946311da111e2a422a938b0b8720c3ecf3341c (diff) |
Return records on update, return just a count on delete (jdbc)
Diffstat (limited to 'src/clojure_sql')
-rw-r--r-- | src/clojure_sql/jdbc.clj | 4 |
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))))))) |