From 0fcbfcdc74f2319eb596df891c1549c951a0a98a Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Wed, 22 Jul 2020 16:55:44 -0700 Subject: [PATCH] Add BOOLEAN to SQLite Tips & Tricks example for #134 --- doc/tips-and-tricks.md | 2 +- test/next/jdbc_test.clj | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/tips-and-tricks.md b/doc/tips-and-tricks.md index b8fd839..e4f391b 100644 --- a/doc/tips-and-tricks.md +++ b/doc/tips-and-tricks.md @@ -364,7 +364,7 @@ You can work around this using a builder that handles reading the column directl (fn [builder ^ResultSet rs ^Integer i] (let [rsm ^ResultSetMetaData (:rsmeta builder)] (rs/read-column-by-index - (if (#{"BIT" "BOOL"} (.getColumnTypeName rsm i)) + (if (#{"BIT" "BOOL" "BOOLEAN"} (.getColumnTypeName rsm i)) (.getBoolean rs i) (.getObject rs i)) rsm diff --git a/test/next/jdbc_test.clj b/test/next/jdbc_test.clj index 3306770..78d5136 100644 --- a/test/next/jdbc_test.clj +++ b/test/next/jdbc_test.clj @@ -347,6 +347,8 @@ VALUES ('Pear', 'green', 49, 47) (fn [builder ^ResultSet rs ^Integer i] (let [rsm ^ResultSetMetaData (:rsmeta builder)] (rs/read-column-by-index + ;; we only use bit and bool for + ;; sqlite (not boolean) (if (#{"BIT" "BOOL"} (.getColumnTypeName rsm i)) (.getBoolean rs i) (.getObject rs i))