Thanks for the help Lukas, Actually Jooqs "hint" would work to add the "SQL_CALC_FOUND_ROWS" to the select statement and Jooq will render it correctly, thanks for that!
Unfortunately it's only possible to add the hint on a SelectFromStep ( http://www.jooq.org/javadoc/latest/org/jooq/SelectFromStep.html#hint(java.lang.String) ) This is what is not working in my case in the code because I don't have the SelectFromStep anymore :). Is it possible to add it afterwards when fetching the select statement to get called by a render mechanism to add this later on? P.S. I've been so far very happy with Jooq and the functionality, looking forward for upcomming releases and features :). Thanks for any help :). Cheers Michael Am Montag, 12. November 2012 09:45:25 UTC+1 schrieb Lukas Eder: > > > Actually I want to figure out the total in a column of the select before > > limiting the result. > > In Oracle I would do it probably by selecting the data within an inner > > select and a field with the window function "COUNT(*) OVER()" which is > also > > provided by Jooq and works for me on Oracle, SQL Server. Unfortunately > MySql > > does not support this functionality and you have to do it with the nice > but > > different "FOUND_ROWS()" function. > > Yes, I'm afraid there is no simple way to implement this uniformly > with MySQL lacking window function support. > > > H2 not support it yet, but might upcoming with the 1.4.X verison. > > As you probably know because I saw that you requested some window > function > > for H2 in the H2 community :). > > True, I have been frequently trying to raise interest in this SQL > standard feature in open source communities. I can recognise a couple > of my own feature requests on the H2 roadmap: > http://www.h2database.com/html/roadmap.html > > Feel free to suggest adding window function support once more on the > H2 user group. > > CUBRID, another fine open source database has recently released > version 9.0 with partial window function support: > > http://www.cubrid.org/blog/news/announcing-cubrid-9-0-with-3x-performance-increase-and-sharding-support/ > > > Cheers > Lukas >
