Key Values From Key Value Repo
open class KeyValuesFromKeyValueRepo<Key, Value, ValuesIterable : Iterable<Value>>(original: KeyValueRepo<Key, ValuesIterable>, listToValuesIterable: suspend (List<Value>) -> ValuesIterable) : ReadKeyValuesFromKeyValueRepo<Key, Value, ValuesIterable> , KeyValuesRepo<Key, Value>
Constructors
Link copied to clipboard
fun <Key, Value, ValuesIterable : Iterable<Value>> KeyValuesFromKeyValueRepo(original: KeyValueRepo<Key, ValuesIterable>, listToValuesIterable: suspend (List<Value>) -> ValuesIterable)
Functions
Link copied to clipboard
Link copied to clipboard
abstract suspend fun get(k: Key, pagination: Pagination, reversed: Boolean = false): PaginationResult<Value>
Link copied to clipboard
abstract suspend fun keys(v: Value, pagination: Pagination, reversed: Boolean = false): PaginationResult<Key>
Properties
Extensions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <Key, Value> KeyValuesRepo<Key, Value>.cached(kvCache: KVCache<Key, List<Value>>, scope: CoroutineScope = CoroutineScope(Dispatchers.Default)): KeyValuesCacheRepo<Key, Value>
fun <Key, Value> ReadKeyValuesRepo<Key, Value>.cached(kvCache: KVCache<Key, List<Value>>): ReadKeyValuesCacheRepo<Key, Value>
fun <Key, Value> ReadKeyValuesRepo<Key, Value>.cached(kvCache: FullKVCache<Key, List<Value>>): FullReadKeyValuesCacheRepo<Key, Value>
Link copied to clipboard
fun <Key, Value> KeyValuesRepo<Key, Value>.caching(kvCache: FullKVCache<Key, List<Value>>, scope: CoroutineScope = CoroutineScope(Dispatchers.Default)): FullKeyValuesCacheRepo<Key, Value>
fun <Key, Value> WriteKeyValuesRepo<Key, Value>.caching(kvCache: FullKVCache<Key, List<Value>>, scope: CoroutineScope = CoroutineScope(Dispatchers.Default)): FullWriteKeyValuesCacheRepo<Key, Value>
Link copied to clipboard
inline fun <FromKey, FromValue, ToKey, ToValue> KeyValuesRepo<ToKey, ToValue>.withMapper(mapper: MapperRepo<FromKey, FromValue, ToKey, ToValue>): KeyValuesRepo<FromKey, FromValue>
inline fun <FromKey, FromValue, ToKey, ToValue> KeyValuesRepo<ToKey, ToValue>.withMapper(noinline keyFromToTo: suspend FromKey.() -> ToKey = { this as ToKey }, noinline valueFromToTo: suspend FromValue.() -> ToValue = { this as ToValue }, noinline keyToToFrom: suspend ToKey.() -> FromKey = { this as FromKey }, noinline valueToToFrom: suspend ToValue.() -> FromValue = { this as FromValue }): KeyValuesRepo<FromKey, FromValue>
inline fun <FromKey, FromValue, ToKey, ToValue> ReadKeyValuesRepo<ToKey, ToValue>.withMapper(mapper: MapperRepo<FromKey, FromValue, ToKey, ToValue>): ReadKeyValuesRepo<FromKey, FromValue>
inline fun <FromKey, FromValue, ToKey, ToValue> ReadKeyValuesRepo<ToKey, ToValue>.withMapper(noinline keyFromToTo: suspend FromKey.() -> ToKey = { this as ToKey }, noinline valueFromToTo: suspend FromValue.() -> ToValue = { this as ToValue }, noinline keyToToFrom: suspend ToKey.() -> FromKey = { this as FromKey }, noinline valueToToFrom: suspend ToValue.() -> FromValue = { this as FromValue }): ReadKeyValuesRepo<FromKey, FromValue>
inline fun <FromKey, FromValue, ToKey, ToValue> WriteKeyValuesRepo<ToKey, ToValue>.withMapper(mapper: MapperRepo<FromKey, FromValue, ToKey, ToValue>): WriteKeyValuesRepo<FromKey, FromValue>
inline fun <FromKey, FromValue, ToKey, ToValue> WriteKeyValuesRepo<ToKey, ToValue>.withMapper(noinline keyFromToTo: suspend FromKey.() -> ToKey = { this as ToKey }, noinline valueFromToTo: suspend FromValue.() -> ToValue = { this as ToValue }, noinline keyToToFrom: suspend ToKey.() -> FromKey = { this as FromKey }, noinline valueToToFrom: suspend ToValue.() -> FromValue = { this as FromValue }): WriteKeyValuesRepo<FromKey, FromValue>