Hi Lucas,
Yes, the Query is created using "plain SQL", DSL.field("column_name") etc
Thanks a lot for putting the in the casting fix so quickly.
Cheers,
Tim
On Saturday, 22 June 2013 15:29:32 UTC+8, Lukas Eder wrote:
>
>
>
>
> 2013/6/20 Lukas Eder <[email protected] <javascript:>>
>
>> Hi Tim,
>>
>> 2013/6/19 <[email protected] <javascript:>>
>>
>> I am a new user to JOOQ but have a question about retrieving BLOB and
>>> CLOB columns (I understand that there is not full support for LOBs, and
>>> that's fine)
>>>
>>> When I query a table with a CLOB column
>>>
>>> ResultQuery<Record> q = // setup a query
>>> for (Result<Record> r : q.fetch()) {
>>> java.sql.Clob c = r.getValue("CLOB_COLUMN", java.sql.Clob.class);
>>> }
>>>
>>> I get an error telling me that oracle.sql.CLOB cannot be converted to
>>> java.sql.Clob. But oracle.sql.CLOB implements java.sql.Clob.
>>>
>>
>> So, in order to get an oracle.sql.CLOB type, I suspect that you have used
>> "plain SQL" to generate your query?
>>
>> ResultQuery<Record> q = // setup a query with plain SQL?
>>
>> That case indeed isn't covered by integration tests, which it should. I
>> have registered #2534 for this:
>> https://github.com/jOOQ/jOOQ/issues/2534
>>
>> Given the fact that jOOQ currently doesn't expose actual LOB types, this
>> is probably a bug. I'll have to see how this could be fixed.
>>
>> In the ConvertAll class if after all the checks have been performed
>>> before failing the conversion could you check if the two types are
>>> compatible with Class.isAssignableFrom(Class) ?
>>>
>>
>> Yes, that's a good idea, too. In fact, this check could be made very
>> early. I have registered #2535 for this:
>> https://github.com/jOOQ/jOOQ/issues/2535
>>
>
> #2535 is implemented in Github master and will be available in the next
> 3.1.0-SNAPSHOT, today:
> https://oss.sonatype.org/content/repositories/snapshots/org/jooq/
>
> Cheers
> Lukas
>
>
>>
>>
>>
>>> I can just retrieve the value as an Object for the time being and cast
>>> it myself to java.sql.Clob but feels like the conversion system should
>>> handle this case for me.
>>>
>>
>> Absolutely! Thanks for reporting
>>
>> Cheers
>> Lukas
>>
>
>
--
You received this message because you are subscribed to the Google Groups "jOOQ
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.