Thanks Lukas! It does help!!!

Point 1 - quite interesting. Actually it clears a lot of fears about your 
design strategy during my incredible dance.
Concern 1 was why the heck you didn't have a uniform API. (Right now I  can 
understand that DSL design obviously necessitated this, but not then!)
Concern 2 was if I take SelectQuery approach somehow I would be limited by 
its API. After all you had to write lots of API classes to achieve all the 
features. Your point 2 takes care of that.

Regarding point 3 though, there is an issue. FactoryOperations doesn't 
expose the count() method or field method - only Factory class does this. 
Since I was injecting into the interface, never would have noticed this 
until you pointed out - something that may need better documentation.

On your first question regarding documentation, I would say samples would 
help. Probably you can explain various use cases in your blog.

All in all I have to say I am impressed with what you are doing and your 
commitment to it.

Thanks,
Dileep 

On Wednesday, May 30, 2012 8:58:53 PM UTC+5:30, Lukas Eder wrote:
>
> Hello Dileep, 
>
> > [...] 
> > Wow! Things got really easy then on. In a matter of lines I had my 
> > conditions and sorts sorted out. 
>
> Yes, some prefer it the hard way ;-) 
> Just kidding. Did you think this section of the manual should be more 
> prominent? How can I improve the manual to make these things clearer? 
>
> > Now the only issue is to do a select(count(*)) in a similar manner - any 
> > pagination search implementation needs one. The problem is that I cannot 
> > find a way of doing in a non DSL manner. 
>
> Some insight: 
>
> 1. You can always access an org.jooq.SelectFinalStep's underlying 
> SelectQuery object using 
> http://www.jooq.org/javadoc/latest/org/jooq/SelectFinalStep.html#getQuery() 
>
> This allows to mix DSL and non-DSL query construction. Most 
> SelectXXXStep types extend the SelectFinalStep. 
>
> 2. You can decide from the Factory / FactoryOperations API whether you 
> want to build a DSL or non-DSL query. For non-DSL queries, use 
>
> http://www.jooq.org/javadoc/latest/org/jooq/FactoryOperations.html#selectQuery()
>  
>
> Note, FactoryOperations.selectCount() is only a convenience method for 
> FactoryOperations.select(Factory.count()) 
>
> 3. Factory.count() is the right method to construct a COUNT(*) 
> expression. You're close with your example code: 
> http://www.jooq.org/javadoc/latest/org/jooq/impl/Factory.html#count() 
>
> Putting things together: 
>
> FactoryOperations f = // Your Spring initialisation logic 
> SelectQuery s = f.selectQuery(); 
> s.addSelect(Factory.count()); 
> s.addFrom(USER_REQUEST); 
> s.addXXX(...); 
>
> Does this help? 
>
> Cheers 
> Lukas 
>

Reply via email to