Hi Lukas,
I was wondering how you write LEFT JOIN LATERAL (...) ON true using the DSL.
To build the following query:
SELECT
choice,
entry_announcements.id,
entry_announcements.encoding,
number
FROM
ivr_menus
LEFT OUTER JOIN
ivr_announcements
ON
ivr_menus.plan = ivr_announcements.plan
LEFT OUTER JOIN
entry_announcements
ON
entry_announcements.id = ivr_announcements.announcement_id
JOIN
group_assignments
ON
group_assignments.group_id = ivr_menus.group_id
LEFT JOIN LATERAL
(
SELECT
entry_announcements.id,
entry_announcements.encoding
FROM
entry_announcements
JOIN
pre_canned_announcements
ON
pre_canned_announcements.announcement_id = entry_announcements.id
LIMIT 1) "pre_canned" ON true
WHERE
ivr_menus.plan = 1
ORDER BY
ivr_announcements.announcement_id DESC;
I've got the following building blocks:
Table preCanned =
DSL.select().
from(ENTRY_ANNOUNCEMENTS).
join(PRE_CANNED_ANNOUNCEMENTS).
on(PRE_CANNED_ANNOUNCEMENTS.ANNOUNCEMENT_ID.eq(ENTRY_ANNOUNCEMENTS.ID)).
limit(1).
asTable("pre_canned");
and then when constructing the "LEFT JOIN LATERAL (...) ON TRUE" I'm
trying the following fragment
.leftOuterJoin(DSL.lateral(
preCanned
)).on(true).
But the compiler is not down with
on(boolean)
Am I doing something wrong here?
Cheers,
Ben
--
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.