From d443c288170903008f6f5ba14f27260a338534c8 Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Sun, 5 Jul 2020 16:11:43 -0700 Subject: [PATCH] Fixes #128 by adding a test --- CHANGELOG.md | 1 + test/next/jdbc_test.clj | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cc7cfe..1b5f095 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Only accretive/fixative changes will be made from now on. Changes made on **develop** since the 1.1.547 release: * Fix #130 by implementing `clojure.lang.ILookup` on the three builder adapters. +* Fix #128 by adding a test for the "not found" arity of lookup on mapified result sets. * Correct MySQL batch statement rewrite tip: it's `:rewriteBatchedStatements true` (plural). Also surface the batch statement tips in the **Tips & Tricks** page. * Clarify how combining is interleaving with reducing in **Reducing and Folding with `plan`**. * Use "JDBC URL" consistently everywhere (instead of "JDBC URI" in several places). diff --git a/test/next/jdbc_test.clj b/test/next/jdbc_test.clj index 0d9bfcf..4870b27 100644 --- a/test/next/jdbc_test.clj +++ b/test/next/jdbc_test.clj @@ -29,6 +29,12 @@ (testing "plan" (is (= "Apple" (reduce (fn [_ row] (reduced (:name row))) + nil + (jdbc/plan + ds-opts + ["select * from fruit where appearance = ?" "red"])))) + (is (= "Banana" + (reduce (fn [_ row] (reduced (:no-such-column row "Banana"))) nil (jdbc/plan ds-opts