get count from db layer as well
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-08-17 16:09:10 +02:00
parent 4f67c48f7a
commit f46386d465
3 changed files with 6 additions and 1 deletions

View File

@ -27,6 +27,10 @@ class ResultObjectService : IResultObjectService {
ResultObjects.selectAll().map { toResultObject(it) }
}
override suspend fun getCount(): Long = dbQuery {
ResultObjects.selectAll().count()
}
override suspend fun getPage(page: Long): List<ApiObject> = dbQuery {
ResultObjects.selectAll().limit(10,page*10).map { toResultObject(it) }
}