Module exposing: page, per, offset, limit
// Source: https://github.com/scalikejdbc/scalikejdbc | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package scalikejdbc.orm
/**
* Pagination builder.
*/
object Pagination {
def page(pageNo: Int): PaginationPageNoBuilder = {
PaginationPageNoBuilder(pageNo = Option(pageNo))
}
def per(pageSize: Int): PaginationPageSizeBuilder = {
PaginationPageSizeBuilder(pageSize = Option(pageSize))
}
}
/**
* Pagination builder.
*/
case class PaginationPageNoBuilder(pageNo: Option[Int] = None) {
def per(pageSize: Int): Pagination =
Pagination(pageNo = pageNo.get, pageSize = pageSize)
}
/**
* Pagination builder.
*/
case class PaginationPageSizeBuilder(pageSize: Opt
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key