Add BOOLEAN to SQLite Tips & Tricks example for #134

This commit is contained in:
Sean Corfield 2020-07-22 16:55:44 -07:00
parent 583aa5b545
commit 0fcbfcdc74
2 changed files with 3 additions and 1 deletions

View file

@ -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

View file

@ -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))