From 781a6d19e11a5c47a48250e11d7d8cf88dd33bf1 Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Thu, 10 Jan 2019 23:25:29 -0800 Subject: [PATCH] Perform base reduce on update counts --- src/next/jdbc.clj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/next/jdbc.clj b/src/next/jdbc.clj index b26ba85..db3869c 100644 --- a/src/next/jdbc.clj +++ b/src/next/jdbc.clj @@ -409,7 +409,7 @@ @result (recur result))) init'))) - (.getUpdateCount stmt))) + (f init (.getUpdateCount stmt)))) (extend-protocol Executable Connection @@ -443,6 +443,8 @@ (def db-spec {:dbtype "h2:mem" :dbname "perf"}) (def con db-spec) (def con (get-datasource db-spec {})) + (get-connection con) + (def con (get-connection (get-datasource db-spec {}))) (def con (get-connection db-spec)) (reduce + 0 (execute! con ["DROP TABLE fruit"])) (reduce + 0 (execute! con ["CREATE TABLE fruit (id int default 0, name varchar(32) primary key, appearance varchar(32), cost int, grade real)"]))