On Monday, September 24, 2012 2:10:17 PM UTC+3, Lukas Eder wrote:
>
>
> Please tell me if you find any other parts from the DSL API that 
> should be rendered more dynamic. 
>
>
At the moment I don't have any other ideas in this area.
 

> Note, there is already a non-DSL "classic" API originating from the 
> early days of jOOQ. This is mentioned here: 
>
> http://www.jooq.org/doc/2.5/manual/sql-building/sql-statements/dsl-and-non-dsl/#N10674
>  
>
>
I have to check that. 
 

> Under the hood, every DSL query uses this "classic" API. In the case 
> of joins, this is already available here: 
>
> http://www.jooq.org/javadoc/latest/org/jooq/SelectQuery.html#addJoin(org.jooq.TableLike,%20org.jooq.JoinType,%20org.jooq.Condition...)
>  
>
>
> The SelectQuery object is available from every DSL Select step: 
> http://www.jooq.org/javadoc/latest/org/jooq/SelectFinalStep.html#getQuery() 
>
>
Can I add query parts in any order (addFrom, addSelect, addJoin, 
AddCondition, add... )? At least following seems to work:

SelectQuery query = db.select().from(AUTHOR).where(BOOK.TITLE.le("Java 
Book")).orderBy(AUTHOR.LAST_NAME,BOOK.TITLE).limit(5).getQuery();
query.addJoin(BOOK, JoinType.LEFT_OUTER_JOIN, BOOK.AUTHOR_ID.eq(AUTHOR.ID));

i.e. query is otherwise ready but then as a last step I add the join. Is 
this coincidence or general feature of the non-DSL API?

My porting project is still on the way, but I have to say that jOOQ seems 
to be very promising. It is fun to work with it. 

Cheers

Jouni

Reply via email to