pagination in db layer
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-08-17 15:57:58 +02:00
parent 5f2d88d3d2
commit 4f67c48f7a
3 changed files with 7 additions and 12 deletions

View File

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