From 9d6e7ab145a890ebaf65c2a06b75f5475eeebc90 Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Wed, 24 Jun 2020 12:25:25 -0700 Subject: [PATCH] Remove unused rsn Since I changed the default multi-result-set format, the result set number is no longer needed. --- src/next/jdbc/result_set.clj | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/next/jdbc/result_set.clj b/src/next/jdbc/result_set.clj index abb1119..4f4f326 100644 --- a/src/next/jdbc/result_set.clj +++ b/src/next/jdbc/result_set.clj @@ -681,9 +681,9 @@ (rest sql-params) opts)] (if (:multi-rs opts) - (loop [go (.execute stmt) acc [] rsn 0] + (loop [go (.execute stmt) acc []] (if-let [rs (stmt->result-set-update-count this stmt go opts)] - (recur (.getMoreResults stmt) (conj acc rs) (inc rsn)) + (recur (.getMoreResults stmt) (conj acc rs)) acc)) (if-let [rs (stmt->result-set stmt opts)] (datafiable-result-set rs this opts) @@ -719,9 +719,9 @@ (rest sql-params) opts)] (if (:multi-rs opts) - (loop [go (.execute stmt) acc [] rsn 0] + (loop [go (.execute stmt) acc []] (if-let [rs (stmt->result-set-update-count this stmt go opts)] - (recur (.getMoreResults stmt) (conj acc rs) (inc rsn)) + (recur (.getMoreResults stmt) (conj acc rs)) acc)) (if-let [rs (stmt->result-set stmt opts)] (datafiable-result-set rs this opts) @@ -746,10 +746,10 @@ {:next.jdbc/update-count (.getUpdateCount this)})) (-execute-all [this _ opts] (if (:multi-rs opts) - (loop [go (.execute this) acc [] rsn 0] + (loop [go (.execute this) acc []] (if-let [rs (stmt->result-set-update-count (.getConnection this) this go (assoc opts :return-keys true))] - (recur (.getMoreResults this) (conj acc rs) (inc rsn)) + (recur (.getMoreResults this) (conj acc rs)) acc)) (if-let [rs (stmt->result-set this (assoc opts :return-keys true))] (datafiable-result-set rs (.getConnection this) opts) @@ -780,10 +780,10 @@ (assert (= 1 (count sql-params)) "Parameters cannot be provided when executing a non-prepared Statement") (if (:multi-rs opts) - (loop [go (.execute this (first sql-params)) acc [] rsn 0] + (loop [go (.execute this (first sql-params)) acc []] (if-let [rs (stmt->result-set-update-count (.getConnection this) this go (assoc opts :return-keys true))] - (recur (.getMoreResults this) (conj acc rs) (inc rsn)) + (recur (.getMoreResults this) (conj acc rs)) acc)) (if-let [rs (stmt-sql->result-set this (first sql-params))] (datafiable-result-set rs (.getConnection this) opts)