Issue Details (XML | Word | Printable)

Key: JDBC-321
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Mark Rotteveel
Reporter: Mark Rotteveel
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Jaybird JCA/JDBC Driver

Implement BOOLEAN support

Created: 02/Aug/13 04:16 PM   Updated: 08/Dec/13 09:47 PM
Component/s: JDBC driver, JNI layer, Wire protocol
Affects Version/s: None
Fix Version/s: Jaybird 2.2.4, Jaybird 3.0

Time Tracking:
Not Specified


 Description  « Hide
Implement Firebird 3 BOOLEAN support, consider including support in 2.2.x as well.

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mark Rotteveel added a comment - 10/Aug/13 02:44 PM - edited
Implemented boolean support in Jaybird 2.2.

A boolean field can also be set with all numeric setters and the string setter (as implied by JDBC 4.1 appendix B).

For numeric types, currently only 0 will set to false and all other values will set to true. This is something that might change in the future. Only 0 for false and 1 for true are guaranteed, in the future we might decide to throw a conversion exception for other values!

For string types we currently set true for "true", "T", "Y" and "1" (case insensitive, ignoring whitespace), all other values will set false; this is for compatibility with the current getBoolean behaviour of FBStringField. This is something that might change in the future. Only "true" and "1" for true and "false" and "0" for false are guaranteed (case insensitive, ignoring whitespace), in the future we might decide to throw a conversion exception for other values!

Mark Rotteveel added a comment - 10/Aug/13 03:22 PM
Implementation hasn't been tested with native/embedded yet

Mark Rotteveel added a comment - 27/Oct/13 08:35 PM
Implementation also works with native Firebird 3 client library. Yet to test how it is handled with a Firebird 2.5 client library with Firebird 3.

As far as I can tell Firebird 3 embedded isn't included in builds, or the way it works has changed in Firebird 3.

Mark Rotteveel added a comment - 02/Nov/13 01:30 PM
No problems with boolean when using Firebird 2.5 client library to connect.