mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-11-15 11:30:25 +00:00
ids in crud repos
This commit is contained in:
@@ -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