Allow setObject(x,y,Types.BIT) if y is a Number & getObject() on bit columns - Mailing list pgsql-patches

From Kim Ho
Subject Allow setObject(x,y,Types.BIT) if y is a Number & getObject() on bit columns
Date
Msg-id 1055956152.13900.31.camel@topanga.toronto.redhat.com
Whole thread Raw
Responses Re: [JDBC] Allow setObject(x,y,Types.BIT) if y is a Number &  (Kim Ho <kho@redhat.com>)
List pgsql-patches
Problem:
 - setObject(x,y,Types.BIT) throws an exception if y is a Number
 - getObject() on a bit column will return null instead of True or False
Boolean objects

Fix:
 - Added check in setObject() to check to that the Number has value==1.
If so, set to True. False otherwise. This seems to be consistent with
the rest of the code.
 - Added BIT to JDBC datatype list


Cheers,

Kim

Attachment

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Runtime.SGML diff ... please expedite!
Next
From: Kim Ho
Date:
Subject: Fix getXXX methods when used with CHAR columns or columns with decimals