added vararg deletion feature

This commit is contained in:
bpavuk
2024-08-03 11:48:44 +03:00
parent 0c1256f469
commit 0865faa1d8

View File

@@ -39,6 +39,7 @@ interface WriteCRUDRepo<ObjectType, IdType, InputValueType> : Repo {
suspend fun update(id: IdType, value: InputValueType): ObjectType? suspend fun update(id: IdType, value: InputValueType): ObjectType?
suspend fun update(values: List<UpdatedValuePair<IdType, InputValueType>>): List<ObjectType> suspend fun update(values: List<UpdatedValuePair<IdType, InputValueType>>): List<ObjectType>
suspend fun deleteById(ids: List<IdType>) suspend fun deleteById(ids: List<IdType>)
suspend fun deleteById(vararg ids: IdType) = deleteById(ids.toList())
} }
typealias WriteStandardCRUDRepo<ObjectType, IdType, InputValueType> = WriteCRUDRepo<ObjectType, IdType, InputValueType> typealias WriteStandardCRUDRepo<ObjectType, IdType, InputValueType> = WriteCRUDRepo<ObjectType, IdType, InputValueType>