From 50fbc5f8f1378bb25cfa5f964cc89fa5ef0d43b4 Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Thu, 18 Apr 2019 00:28:23 -0700 Subject: [PATCH] Respect :gen-fn in execute-one --- src/next/jdbc/result_set.clj | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/next/jdbc/result_set.clj b/src/next/jdbc/result_set.clj index 165a7ab..a8d60f5 100644 --- a/src/next/jdbc/result_set.clj +++ b/src/next/jdbc/result_set.clj @@ -262,8 +262,10 @@ (rest sql-params) opts)] (if-let [rs (stmt->result-set stmt opts)] - (when (.next rs) - (datafiable-row (row-builder (map-row-builder rs opts)) this opts)) + (let [gen-fn (get opts :gen-fn map-row-builder) + gen (gen-fn rs opts)] + (when (.next rs) + (datafiable-row (row-builder gen) this opts))) {:next.jdbc/update-count (.getUpdateCount stmt)}))) (-execute-all [this sql-params opts] (with-open [stmt (prepare/create this