Hello,

Sorry for the delay

2015-06-30 11:45 GMT+02:00 <[email protected]>:

> Hello,
>
> I'm trying to implement one of these queries with jOOQ 3.6.2 & PostgreSQL
> 9.3:
>
> http://sqlfiddle.com/#!15/b1ad8/9
>
> Here's one of it:
>
> SELECT id, row_to_json((SELECT d FROM (SELECT name, addr) d))::text AS data
> FROM   myt;
>
> But I couldn't find any ways to select from row values.
>
> Is this possible?
>

We've added some experimental, undocumented support, which is why I won't
inofficially document it here in this thread yet :)
In your particular case, however, you'll be best off by using plain SQL to
support row_to_json():

public static void Field<String> rowToJson(Select<?> select) {

    return DSL.field("row_to_json({0})::text", String.class, select);

}


You can then pass arbitrary jOOQ select statements to that function.

Hope this helps,
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/d/optout.

Reply via email to