klyn.data.sql.SQLDialect.paginate
method
public paginate(sql as String, hasOrder as Boolean, offset as Long, limit as Long) as String
Description

Renders provider-specific pagination for a SELECT statement.

Parameters
ParameterDescription
sqlGenerated SELECT statement.
hasOrderWhether the statement already contains ORDER BY.
offsetNumber of rows to skip.
limitMaximum number of rows, or a negative value for no limit.
Returns

SELECT statement with provider-native pagination.

Example
dialect as SQLDialect = SQLiteDialect()
print(dialect.paginate("SELECT id FROM users", false, 0l, 10l))