clean code

This commit is contained in:
2019-08-04 22:23:12 +02:00
parent 24349fc71f
commit 01a0000b15
9 changed files with 49 additions and 47 deletions

View File

@@ -1,6 +1,5 @@
package fr.postgresjson.connexion
import com.github.jasync.sql.db.util.length
import fr.postgresjson.entity.EntityI
data class Paginated<T: EntityI<*>>(
@@ -10,7 +9,7 @@ data class Paginated<T: EntityI<*>>(
val total: Int
) {
val currentPage: Int = (offset / limit) + 1
val count: Int = result.length
val count: Int = result.size
init {
if (offset < 0) error("offset must be greather or equal than 0")