mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2026-11-13 23:42:56 +00:00
ids in crud repos
This commit is contained in:
1 parent
04c301d1ac
commit
217e977f0d
14 files changed
+88
No files matched your search
Vendored
+6
@@ -46,6 +46,12 @@ open class FullReadCRUDCacheRepo<ObjectType, IdType>(
|
||||
{ if (it.results.isNotEmpty()) actualizeAll() }
|
||||
)
|
||||
|
||||
override suspend fun getIdsByPagination(pagination: Pagination): PaginationResult<IdType> = doOrTakeAndActualize(
|
||||
{ keys(pagination).takeIf { it.results.isNotEmpty() }.optionalOrAbsentIfNull },
|
||||
{ getIdsByPagination(pagination) },
|
||||
{ if (it.results.isNotEmpty()) actualizeAll() }
|
||||
)
|
||||
|
||||
override suspend fun count(): Long = doOrTakeAndActualize(
|
||||
{ count().takeIf { it != 0L }.optionalOrAbsentIfNull },
|
||||
{ count() },
|
||||
|
||||
Reference in new issue
Block a user