summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@clearboxsystems.com.au>2013-11-25 01:41:33 +1100
committerCarlo Zancanaro <carlo@clearboxsystems.com.au>2013-11-25 01:41:33 +1100
commit13eecd8c0772906318e9fa3b0cf752fc960319c3 (patch)
tree8b784dfc1fea8c532620e19862ca73c09753dfb8
parentfe1a2f5ef652cb943be14982f31b3ad236d00629 (diff)
Fix the jdbc query executor for insert/update/delete operationsHEADmaster
-rw-r--r--src/clojure_sql/jdbc.clj6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/clojure_sql/jdbc.clj b/src/clojure_sql/jdbc.clj
index 253f680..d976e37 100644
--- a/src/clojure_sql/jdbc.clj
+++ b/src/clojure_sql/jdbc.clj
@@ -31,14 +31,14 @@
(insert! [_ query records]
(let [compiled (compiler/compile-insert db-type query records)]
(jdbc/with-connection connection-string
- (jdbc/do-prepared-return-keys (first query) (next query)))))
+ (jdbc/do-prepared-return-keys (first compiled) (next compiled)))))
(update! [_ query partial-record]
(let [compiled (compiler/compile-update db-type query partial-record)]
(jdbc/with-connection connection-string
- (jdbc/do-prepared-return-keys (first query) (next query)))))
+ (jdbc/do-prepared-return-keys (first compiled) (next compiled)))))
(delete! [_ query]
(let [compiled (compiler/compile-delete db-type query)]
(jdbc/with-connection connection-string
- (first (jdbc/do-prepared (first query) (next query)))))))))
+ (first (jdbc/do-prepared (first compiled) (next compiled)))))))))