pagination in db layer
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user