Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard

Full one-to-many key-values repository adapter that applies type mapping via MapperRepo. Composes MapperReadKeyValuesRepo and MapperWriteKeyValuesRepo for read and write delegation.

Link copied to clipboard

A ReadCRUDRepo wrapper that maps between different key and value types. Allows adapting a repository with one type system to work with another type system.

Link copied to clipboard

Read-only key-value repository adapter that applies type mapping via MapperRepo. Converts outer (From) key/value types to inner (To) types before delegating to to, and converts results back from inner to outer types.

Link copied to clipboard

Read-only one-to-many key-values repository adapter that applies type mapping via MapperRepo. Converts outer (From) key/value types to inner (To) types before delegating to to, and converts results back from inner to outer types.

Link copied to clipboard

A WriteCRUDRepo wrapper that maps between different key, value, and input types. Allows adapting a repository to work with different type systems for both reading and writing.

Link copied to clipboard

Write-only key-value repository adapter that applies type mapping via MapperRepo. Converts outer (From) key/value types to inner (To) types before delegating writes to to, and maps emitted flow values back from inner to outer types.

Link copied to clipboard

Write-only one-to-many key-values repository adapter that applies type mapping via MapperRepo. Converts outer (From) key/value types to inner (To) types before delegating writes to to, and maps emitted flow values back from inner to outer types.

Functions

Link copied to clipboard

Wraps this KeyValueRepo with a MapperRepo to expose a mapped KeyValueRepo.

Wraps this KeyValuesRepo with a MapperRepo to expose a mapped KeyValuesRepo.

Wraps this ReadCRUDRepo with a mapper to expose different key and value types.

Wraps this ReadKeyValueRepo with a MapperRepo to expose a mapped ReadKeyValueRepo.

Wraps this ReadKeyValuesRepo with a MapperRepo to expose a mapped ReadKeyValuesRepo.

Wraps this WriteKeyValueRepo with a MapperRepo to expose a mapped WriteKeyValueRepo.

Wraps this WriteKeyValuesRepo with a MapperRepo to expose a mapped WriteKeyValuesRepo.

inline fun <FromKey, FromValue, FromInput, ToKey, ToValue, ToInput> CRUDRepo<ToValue, ToKey, ToInput>.withMapper(noinline keyFromToTo: suspend FromKey.() -> ToKey = { this as ToKey }, noinline valueFromToTo: suspend FromValue.() -> ToValue = { this as ToValue }, noinline inputFromToTo: suspend FromInput.() -> ToInput = { this as ToInput }, noinline keyToToFrom: suspend ToKey.() -> FromKey = { this as FromKey }, noinline valueToToFrom: suspend ToValue.() -> FromValue = { this as FromValue }, noinline inputToToFrom: suspend ToInput.() -> FromInput = { this as FromInput }): CRUDRepo<FromValue, FromKey, FromInput>
inline fun <FromKey, FromValue, FromInput, ToKey, ToValue, ToInput> WriteCRUDRepo<ToValue, ToKey, ToInput>.withMapper(noinline keyFromToTo: suspend FromKey.() -> ToKey = { this as ToKey }, noinline valueFromToTo: suspend FromValue.() -> ToValue = { this as ToValue }, noinline inputFromToTo: suspend FromInput.() -> ToInput = { this as ToInput }, noinline keyToToFrom: suspend ToKey.() -> FromKey = { this as FromKey }, noinline valueToToFrom: suspend ToValue.() -> FromValue = { this as FromValue }, noinline inputToToFrom: suspend ToInput.() -> FromInput = { this as FromInput }): WriteCRUDRepo<FromValue, FromKey, FromInput>

inline fun <FromKey, FromValue, ToKey, ToValue> KeyValueRepo<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 }): KeyValueRepo<FromKey, FromValue>

Wraps this KeyValueRepo with inline conversion lambdas to expose a mapped KeyValueRepo.

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>

Wraps this KeyValuesRepo with inline conversion lambdas to expose a mapped KeyValuesRepo.

inline fun <FromKey, FromValue, ToKey, ToValue> ReadCRUDRepo<ToValue, ToKey>.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 }): ReadCRUDRepo<FromValue, FromKey>

Wraps this ReadCRUDRepo with custom conversion functions for keys and values.

inline fun <FromKey, FromValue, ToKey, ToValue> ReadKeyValueRepo<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 }): ReadKeyValueRepo<FromKey, FromValue>

Wraps this ReadKeyValueRepo with inline conversion lambdas to expose a mapped ReadKeyValueRepo.

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>

Wraps this ReadKeyValuesRepo with inline conversion lambdas to expose a mapped ReadKeyValuesRepo.

inline fun <FromKey, FromValue, ToKey, ToValue> WriteKeyValueRepo<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 }): WriteKeyValueRepo<FromKey, FromValue>

Wraps this WriteKeyValueRepo with inline conversion lambdas to expose a mapped WriteKeyValueRepo.

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>

Wraps this WriteKeyValuesRepo with inline conversion lambdas to expose a mapped WriteKeyValuesRepo.