public paginate(sql as String, hasOrder as Boolean, offset as Long, limit as Long) as String
Renders provider-specific pagination for a SELECT statement.
| Parameter | Description |
|---|---|
sql | Generated SELECT statement. |
hasOrder | Whether the statement already contains ORDER BY. |
offset | Number of rows to skip. |
limit | Maximum number of rows, or a negative value for no limit. |
SELECT statement with provider-native pagination.
dialect as SQLDialect = SQLiteDialect()
print(dialect.paginate("SELECT id FROM users", false, 0l, 10l))