2015-06-05 11:24 GMT+02:00 Ben Hood <[email protected]>:

> Hi Lukas,
>
> On Fri, Jun 5, 2015 at 10:00 AM, Lukas Eder <[email protected]> wrote:
>
> > In the meantime, you'll have to somehow generate a "true" predicate. Here
> > are some ideas:
> >
> > on("true")
> > on("1 = 1")
> > on(DSL.trueCondition())
> > on(DSL.condition(true))
>
> Many thanks for this - I've changed the LEFT OUTER JOIN LATERAL () ON
> true generation to this:
>
> leftOuterJoin(DSL.lateral(
>     ctx.select().
>         from(ENTRY_ANNOUNCEMENTS).
>         join(PRE_CANNED_ANNOUNCEMENTS).
>         on(PRE_CANNED_ANNOUNCEMENTS.ANNOUNCEMENT_ID.eq(
> ENTRY_ANNOUNCEMENTS.ID)).
>         limit(1)
> )).on(DSL.trueCondition())
>
> Now the whole thing works perfectly :-)
>
> Regarding the API change - from my perspective I think the API as it
> is currently is pretty good for this scenario - it was just my
> ignorance of how the API works. This kind of example is something you
> might put into some kind of JOOQ cookbook, but of course, who has the
> time to be writing this kind of thing for free?
>

Why don't *you* write one :) We'll help you sell it, of course!

On a more serious note, I hope I'll have time in until early 2016 to write
such a book. It won't be about jOOQ only, but about SQL. And it will
definitely help people understand awesome things like LATERAL.

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/d/optout.

Reply via email to