That's quite an interesting MySQL feature. Looks much like an Oracle
hint to me. In Oracle, you would write:
SELECT /*+INDEX(...)*/ * FROM t WHERE ...
So if this SQL_CALC_FOUND_ROWS option is to be put between the SELECT
(DISTINCT) keyword(s) and the SELECT column expression list, you could
use jOOQ's .hint() method for that:
http://www.jooq.org/javadoc/latest/org/jooq/SelectFromStep.html#hint(java.lang.String)
An example is given in the manual:
http://www.jooq.org/doc/2.6/manual/sql-building/sql-statements/select-statement/oracle-hints/
Let me know if this works for you. If it does, I'll add some more
documentation to the hint() method, then
Cheers
Lukas
2012/11/11 <[email protected]>:
> Is it possible to add/render the "SQL_CALC_FOUND_ROWS" which is necessary
> for the by MySql FOUND_ROWS() function to the Jooq-Select Statement to
> retrieve the total of the result set not limit by the limit statement ?
>
> MySql Reference: FOUND_ROWS()
>
> My workaround would be to add "SQL_CALC_FOUND_ROWS" as a Jooq-Field but jooq
> will render the comma ',' after the "SQL_CALC_FOUND_ROWS" which has to be
> removed after rendering. Not that nice workaround which I'd like to avoid.
>
> Thanks.