mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-11-26 03:58:45 +00:00
change order of functions in read one to many interface
This commit is contained in:
parent
6928ca5329
commit
dbd2e963a1
@ -43,20 +43,22 @@ interface WriteOneToManyKeyValueRepo<Key, Value> : Repo {
|
||||
val onValueRemoved: Flow<Pair<Key, Value>>
|
||||
val onDataCleared: Flow<Key>
|
||||
|
||||
@Deprecated("Will be extracted as extension for other add method")
|
||||
suspend fun add(k: Key, v: Value)
|
||||
suspend fun add(toAdd: Map<Key, List<Value>>) = toAdd.forEach { (k, values) ->
|
||||
values.forEach { v ->
|
||||
add(k, v)
|
||||
}
|
||||
}
|
||||
@Deprecated("Will be extracted as extension for other remove method")
|
||||
suspend fun remove(k: Key, v: Value)
|
||||
@Deprecated("Will be extracted as extension for other add method")
|
||||
suspend fun add(k: Key, v: Value)
|
||||
|
||||
suspend fun remove(toRemove: Map<Key, List<Value>>) = toRemove.forEach { (k, values) ->
|
||||
values.forEach { v ->
|
||||
remove(k, v)
|
||||
}
|
||||
}
|
||||
@Deprecated("Will be extracted as extension for other remove method")
|
||||
suspend fun remove(k: Key, v: Value)
|
||||
|
||||
suspend fun clear(k: Key)
|
||||
}
|
||||
@Deprecated("Renamed", ReplaceWith("WriteOneToManyKeyValueRepo", "dev.inmo.micro_utils.repos.WriteOneToManyKeyValueRepo"))
|
||||
|
Loading…
Reference in New Issue
Block a user