clean code

This commit is contained in:
flecomte committed 2019-08-04 22:23:12 +02:00
1 parent 24349fc71f
commit 01a0000b15
9 files changed
+49 -47

No files matched your search

@@ -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")