Use OFFSET/FETCH syntax in H2 dialect.
As per suggestion of the H2 maintainer.
Closes
Original pull request
@@ -56,7 +56,7 @@ public class H2Dialect extends AbstractDialect {
@Override
public String getLimitOffset(long limit, long offset) {
- return String.format("LIMIT %d OFFSET %d", limit, offset);
+ return String.format("OFFSET %d ROWS FETCH FIRST %d ROWS ONLY", offset, limit);
}
@Override
