diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/scala/xyz/driver/restquery/query/Pagination.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/scala/xyz/driver/restquery/query/Pagination.scala b/src/main/scala/xyz/driver/restquery/query/Pagination.scala index b899d1b..d606775 100644 --- a/src/main/scala/xyz/driver/restquery/query/Pagination.scala +++ b/src/main/scala/xyz/driver/restquery/query/Pagination.scala @@ -3,7 +3,9 @@ package xyz.driver.restquery.query /** * @param pageNumber Starts with 1 */ -final case class Pagination(pageSize: Int, pageNumber: Int) +final case class Pagination(pageSize: Int, pageNumber: Int) { + def offset: Int = pageSize * pageNumber +} object Pagination { |