> This looks like the way to go, so far. What I'm currently uncertain
> about is the fact whether Tuple1, Tuple2, Tuple3, ... TupleN types
> should influence the Record type
>
> Any other ideas?

Good news for tuple support. An early prototype of the aforementioned
solution candidate seems not to uncover any show stoppers. With a
canonical solution, I can easily run any of the following queries:


------------------------------------------------------------
// (ID, TITLE, ID) = (1, '1984', ID)
------------------------------------------------------------
create().select(TBook_TITLE())
        .from(TBook())
        .where(tuple(TBook_ID(), TBook_TITLE(),
TBook_ID()).equal(val(1), inline("1984"), TBook_ID())).fetch();

------------------------------------------------------------
// (ID, TITLE) in ((1, '1984'), (2, 'Animal Farm'))
------------------------------------------------------------
create().select(TBook_TITLE())
        .from(TBook())
        .where(tuple(TBook_ID(), TBook_TITLE()).in(
               tuple(1, "1984"),
               tuple(2, "Animal Farm"))).fetch();

------------------------------------------------------------
// (ID, TITLE) in ((select ID, TITLE from T_BOOK where AUTHOR_ID = 1))
// Types and arity are not formally type checked, here
------------------------------------------------------------
create().select(TBook_TITLE())
        .from(TBook())
        .where(tuple(TBook_ID(), TBook_TITLE()).in(create()
            .select(TBook_ID(), TBook_TITLE())
            .from(TBook())
            .where(TBook_AUTHOR_ID().equal(1)))).fetch();
------------------------------------------------------------

So, basic tuple support has high chances of making it into jOOQ 2.6.0

Reply via email to