Hi,
I tried to do a "select * from table where x = '1' limit 1 offset 0 for
update;" with jOOQ. Now the javadoc (and the first page of the jOOQ
homepage) clearly states that this is possible:
create.select(TAuthor.FIRST_NAME, TAuthor.LAST_NAME, create.count())
.from(T_AUTHOR)
.join(T_BOOK).on(TBook.AUTHOR_ID.equal(TAuthor.ID))
.where(TBook.LANGUAGE.equal("DE"))
.and(TBook.PUBLISHED.greaterThan(parseDate('2008-01-01')))
.groupBy(TAuthor.FIRST_NAME, TAuthor.LAST_NAME)
.having(create.count().greaterThan(5))
.orderBy(TAuthor.LAST_NAME.asc().nullsFirst())
.limit(2)
.offset(1)
.forUpdate()
.of(TAuthor.FIRST_NAME, TAuthor.LAST_NAME)
.noWait();
But I couldn't get it to work. A look at the interfaces reveals that the
call to "offset(1)" from "SelectOffsetStep" returns a "SelectFinalStep"
interface and not a "SelectForUpdateStep" interface.
Has this just been forgotten to reflect in the documentation or is this a
bug in the implementation?
Thanks,
Andreas