db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lance J. Andersen" <Lance.Ander...@Sun.COM>
Subject Re: [jira] Updated: (DERBY-499) Expose BOOLEAN datatype to end users
Date Wed, 23 Nov 2005 17:46:07 GMT
Hi Rick,

Rick Hillegas wrote:

> Hi Lance,
>
> If ResultSet.getObject() throws an unimplemented feature exception, 
> should the corresponding ResultSetMetaData.getColumnClassName() throw 
> an exception? Return null?

A SQLException is the correct Exception to be thrown per the spec when 
something is not implemented.  I am not sure null is correct, i guess an 
Exception given null is not specified in the javadocs as an appropriate 
return value.

>
> Thanks,
> -Rick
>
> Army wrote:
>
>> Rick Hillegas wrote:
>>
>>> Dan Debrunner wrote:
>>>
>>>> I think I see a similar problem with the upcoming XML changes. If we
>>>> return XML as CLOB in jdk 1.4 then applications will break when then
>>>> switch to the jdk that supports JDBC 4.0. Again for the same reason,
>>>> with jdk 1.4 getObject would return java.sql.Clob and in the JDBC 4.0
>>>> jdk it would return java.sql.SQLXML. I think for this case
>>>> get/setObject() should not succeed for XML columns until JDBC 4.0 is
>>>> supported.
>>>>  
>>>>
>>> Agreed.
>>
>>
>>
>> Okay, sounds good.  Then what should we return for the metadata 
>> "class name"? Esp. ResultSetMetaData.getColumnClassName()?
>>
>> The API for that method says:
>>
>> "Returns the fully-qualified name of the Java class whose instances 
>> are manufactured if the method ResultSet.getObject  is called to 
>> retrieve a value from the column."
>>
>> So should a call to that method fail, too?
>>
>> Army
>>
>

Mime
View raw message