diff options
author | Kseniya Tomskikh <ktomskih@datamonsters.co> | 2018-02-28 17:24:20 +0700 |
---|---|---|
committer | Kseniya Tomskikh <ktomskih@datamonsters.co> | 2018-02-28 17:24:20 +0700 |
commit | 1a92804023ff1c93732ed93e7d237a6b47984b62 (patch) | |
tree | b054180d0042c5c4a56fd34bab14305afed8b365 /src | |
parent | 32fb404ef3d99eb4aa9bc5e25e083bc13f5972dc (diff) | |
download | rest-query-1a92804023ff1c93732ed93e7d237a6b47984b62.tar.gz rest-query-1a92804023ff1c93732ed93e7d237a6b47984b62.tar.bz2 rest-query-1a92804023ff1c93732ed93e7d237a6b47984b62.zip |
Added offset to Pagination classv1.1.6
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 { |