Package-level declarations

Types

Link copied to clipboard

Full read-write adapter that exposes a KeyValueRepo storing iterables as a KeyValuesRepo. Extends ReadKeyValuesFromKeyValueRepo with write operations: add, remove, clear. Emits onNewValue and onValueRemoved for individual value changes; onDataCleared mirrors KeyValueRepo.onValueRemoved.

Link copied to clipboard

Adapter that exposes a ReadKeyValueRepo storing iterables as a ReadKeyValuesRepo. Each key maps to a ValuesIterable in the underlying repo, which is exposed as a one-to-many relationship.

Functions

Link copied to clipboard
@JvmName(name = "asListKeyValuesRepo")
fun <K, V> KeyValueRepo<K, List<V>>.asKeyValuesRepo(): KeyValuesFromKeyValueRepo<K, V, List<V>>

Wraps this KeyValueRepo (mapping keys to Lists) as a KeyValuesFromKeyValueRepo. Uses identity conversion for the list iterable.

@JvmName(name = "asSetKeyValuesRepo")
fun <K, V> KeyValueRepo<K, Set<V>>.asKeyValuesRepo(): KeyValuesFromKeyValueRepo<K, V, Set<V>>

Wraps this KeyValueRepo (mapping keys to Sets) as a KeyValuesFromKeyValueRepo. Converts lists to sets when persisting changes, ensuring value uniqueness per key.

fun <K, V, VI : Iterable<V>> KeyValueRepo<K, VI>.asKeyValuesRepo(listToValuesIterable: suspend (List<V>) -> VI): KeyValuesFromKeyValueRepo<K, V, VI>

Wraps this KeyValueRepo (mapping keys to iterables) as a KeyValuesFromKeyValueRepo, exposing a full one-to-many read-write interface.

Link copied to clipboard

Wraps this ReadKeyValueRepo (mapping keys to iterables) as a ReadKeyValuesFromKeyValueRepo, exposing a one-to-many read interface.