From 13eecd8c0772906318e9fa3b0cf752fc960319c3 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Mon, 25 Nov 2013 01:41:33 +1100 Subject: Fix the jdbc query executor for insert/update/delete operations --- src/clojure_sql/jdbc.clj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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))))))))) -- cgit v1.2.3