Archimedes Trajano
Archimedes Trajano

Reputation: 41560

How do I have a composite field set in JOOQ

I have a query with a composite field set (I don't know what else to call it, pls put in comments what the proper term is so I can update)

select
    name,
    `value`
from
    docs
where
    superceded_by is null
    and doc_id = 1
    and ( name , effective_on) in (  <----- composite field set
    select
        name,
        max(effective_on)
    from
        docs
    where
        superceded_by is null
        and doc_id = 1
        and effective_on <= '2017-02-01'
    group by
        name )

I want to convert that to JOOQ but I can't seem to find an equivalent for it. I tried DSL.recordType already but it does not support in

Here's the query in context

http://sqlfiddle.com/#!9/514a8c7/11

Upvotes: 0

Views: 145

Answers (1)

Archimedes Trajano
Archimedes Trajano

Reputation: 41560

It is DSL.row(DOCS.NAME, DOCS.EFFECTIVE_ON)

Upvotes: 2

Related Questions