Pagination

data class Pagination(val index: Int, val size: Int)

Data class representing pagination settings for queries.

This class defines which page of results to retrieve and how many items per page. Page indexing starts from 1, and the offset is calculated automatically.

Samples

Constructors

Link copied to clipboard
constructor(index: Int, size: Int)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val index: Int

The page number to retrieve (1-based indexing).

Link copied to clipboard
val size: Int

The number of items per page.

Functions

Link copied to clipboard
fun offset(): Int

Calculates the zero-based offset for this pagination settings.