Some JDBC drivers return a Boolean that is constructed and not identical to Clojure's true/false

Description

After some experimentation, I've discovered that certain JDBC drivers return the equivalent of (Boolean. true) and (Boolean. false) which are truthy/falsey but sometimes produce surprising results since they are not actually true and false. Extending the result set reading protocol to Boolean to turn them into canonical values via if seems to do the trick.

Environment

None

Activity

Show:

Sean CorfieldDecember 16, 2013 at 9:13 PM

Added Boolean implementation to IResultSetReadColumn.

Sean CorfieldDecember 16, 2013 at 8:25 PM

A simple (if v true false) is not sufficient for this - it needs to be (if (= true v) true false) based on tests I've conducted. The problem is that the constructed (Boolean. false) value behaves as truthy.

Completed

Details

Assignee

Reporter

Priority

Created December 16, 2013 at 8:00 PM
Updated June 1, 2016 at 6:41 PM
Resolved June 1, 2016 at 6:41 PM