So I'd have to re-create the conditional structure in a tree, then convert it into jOOQ API calls. That works, because I already have the code I used to do that with Hibernate and I can just modify it to work with jOOQ.
The non-DSL API would be very useful for the composition of queries. This could save a lot of boilerplate. That's great! Thanks :) On Thursday, June 28, 2012 12:04:36 PM UTC-4, Lukas Eder wrote: > > Hi > > > Though, I'm just a beginner, I really like jOOQ and I think it's one of > the > > most awesome libraries I have ever used. > > Thanks > > > [...] > > Is it possible to create a where clause and pass it into the function, > > instead of returning the select clause? > > Yes. You can create any kind of org.jooq.Condition object and pass > that to the SelectWhereStep.where() method. For a more incremental > query-building approach, consider using the non-DSL API. This is > somewhat described here: > > http://www.jooq.org/manual/JOOQ/Query/ > > Essentially, you can access the org.jooq.QueryObject type by using > yourSelect.getQuery(), and then add a condition. > > Hope this helps > Lukas >
