// Only "TOP" support provided by the following dialects.
// "OFFSET" support is simulated with nested selects
// -----------------------------------------------------------------
case DB2: {
if (offset != null) {
throw new DataAccessException("DB2 does not support offsets in FETCH FIRST ROWS ONLY clause");
}
// DB2 doesn't allow bind variables here. Casting is not needed.
context.inline(true)
.formatSeparator()
.keyword("fetch first ")
.sql(numberOfRows)
.keyword(" rows only")
.inline(inline);
break;
}
case ASE:
case SQLSERVER: {
if (offset != null) {
throw new DataAccessException("Offsets in TOP clause not supported");
}
// SQL Server and Sybase don't allow bind variables in the TOP n clause
context.inline(true)
.keyword("top ")