selectPage
fun <T : Table, R> T.selectPage(provider: DatabaseProvider, offset: Long = 0, limit: Int = 20, where: () -> Op<Boolean>? = null, orderBy: List<Pair<Expression<*>, SortOrder>> = emptyList(), mapper: ResultRow.(T) -> R): PageResult<R>
Executes a paginated SELECT against this table inside a provider transaction.
val page = PlayersTable.selectPage(
provider = db,
offset = 0,
limit = 10,
where = { PlayersTable.score greaterThan 100 },
orderBy = listOf(PlayersTable.score to SortOrder.DESC)
) { PlayersTable.mapRow(this) }Content copied to clipboard