aboutsummaryrefslogtreecommitdiff
path: root/src/clojure/contrib/sql.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/clojure/contrib/sql.clj')
-rw-r--r--src/clojure/contrib/sql.clj6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/clojure/contrib/sql.clj b/src/clojure/contrib/sql.clj
index 38286bba..ea9d8f0d 100644
--- a/src/clojure/contrib/sql.clj
+++ b/src/clojure/contrib/sql.clj
@@ -48,7 +48,8 @@
(with-open [stmt (.createStatement (connection))]
(doseq [cmd commands]
(.addBatch stmt cmd))
- (into [] (.executeBatch stmt))))
+ (transaction
+ (seq (.executeBatch stmt)))))
(defn do-prepared
"Executes an (optionally parameterized) SQL prepared statement on the
@@ -60,7 +61,8 @@
(doseq [[index value] (map vector (iterate inc 1) param-group)]
(.setObject stmt index value))
(.addBatch stmt))
- (into [] (.executeBatch stmt))))
+ (transaction
+ (seq (.executeBatch stmt)))))
(defn create-table
"Creates a table on the open database connection given a table name and