mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-09-15 13:29:38 +00:00
new crud repo extensions on*
This commit is contained in:
@@ -42,6 +42,22 @@ interface WriteCRUDRepo<ObjectType, IdType, InputValueType> : Repo {
|
||||
}
|
||||
typealias WriteStandardCRUDRepo<ObjectType, IdType, InputValueType> = WriteCRUDRepo<ObjectType, IdType, InputValueType>
|
||||
|
||||
/**
|
||||
* Just mirroring [WriteCRUDRepo.newObjectsFlow] to be same as in KV repos
|
||||
*/
|
||||
val <ObjectType> WriteCRUDRepo<ObjectType, *, *>.onNewObjects: Flow<ObjectType>
|
||||
get() = newObjectsFlow
|
||||
/**
|
||||
* Just mirroring [WriteCRUDRepo.updatedObjectsFlow] to be same as in KV repos
|
||||
*/
|
||||
val <ObjectType> WriteCRUDRepo<ObjectType, *, *>.onUpdatedObjects: Flow<ObjectType>
|
||||
get() = updatedObjectsFlow
|
||||
/**
|
||||
* Just mirroring [WriteCRUDRepo.deletedObjectsIdsFlow] to be same as in KV repos
|
||||
*/
|
||||
val <IdType> WriteCRUDRepo<*, IdType, *>.onDeletedObjectsIds: Flow<IdType>
|
||||
get() = deletedObjectsIdsFlow
|
||||
|
||||
suspend fun <ObjectType, IdType, InputValueType> WriteCRUDRepo<ObjectType, IdType, InputValueType>.create(
|
||||
vararg values: InputValueType
|
||||
): List<ObjectType> = create(values.toList())
|
||||
|
Reference in New Issue
Block a user