# Package-level declarations

## Types

MapperCRUDRepo
Link copied to clipboard
open class MapperCRUDRepo < FromId , FromRegistered , FromInput , ToId , ToRegistered , ToInput >(to: CRUDRepo < ToRegistered , ToId , ToInput >, mapper: MapperRepo < FromId , FromRegistered , ToId , ToRegistered >, inputMapper: SimpleSuspendableMapper < FromInput , ToInput >) : CRUDRepo < FromRegistered , FromId , FromInput > , MapperRepo < FromId , FromRegistered , ToId , ToRegistered > , ReadCRUDRepo < FromRegistered , FromId > , WriteCRUDRepo < FromRegistered , FromId , FromInput >
MapperKeyValueRepo
Link copied to clipboard
open class MapperKeyValueRepo < FromKey , FromValue , ToKey , ToValue >(to: KeyValueRepo < ToKey , ToValue >, mapper: MapperRepo < FromKey , FromValue , ToKey , ToValue >) : KeyValueRepo < FromKey , FromValue > , MapperRepo < FromKey , FromValue , ToKey , ToValue > , ReadKeyValueRepo < FromKey , FromValue > , WriteKeyValueRepo < FromKey , FromValue >

Full key-value repository adapter that applies type mapping via MapperRepo. Composes MapperReadKeyValueRepo and MapperWriteKeyValueRepo for read and write delegation.

MapperKeyValuesRepo
Link copied to clipboard
open class MapperKeyValuesRepo < FromKey , FromValue , ToKey , ToValue >(to: KeyValuesRepo < ToKey , ToValue >, mapper: MapperRepo < FromKey , FromValue , ToKey , ToValue >) : KeyValuesRepo < FromKey , FromValue > , MapperRepo < FromKey , FromValue , ToKey , ToValue > , ReadKeyValuesRepo < FromKey , FromValue > , WriteKeyValuesRepo < FromKey , FromValue >

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

MapperReadCRUDRepo
Link copied to clipboard
open class MapperReadCRUDRepo < FromId , FromRegistered , ToId , ToRegistered >(to: ReadCRUDRepo < ToRegistered , ToId >, mapper: MapperRepo < FromId , FromRegistered , ToId , ToRegistered >) : ReadCRUDRepo < FromRegistered , FromId > , MapperRepo < FromId , FromRegistered , ToId , ToRegistered >

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.

MapperReadKeyValueRepo
Link copied to clipboard
open class MapperReadKeyValueRepo < FromKey , FromValue , ToKey , ToValue >(to: ReadKeyValueRepo < ToKey , ToValue >, mapper: MapperRepo < FromKey , FromValue , ToKey , ToValue >) : ReadKeyValueRepo < FromKey , FromValue > , MapperRepo < FromKey , FromValue , ToKey , ToValue >

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.

MapperReadKeyValuesRepo
Link copied to clipboard
open class MapperReadKeyValuesRepo < FromKey , FromValue , ToKey , ToValue >(to: ReadKeyValuesRepo < ToKey , ToValue >, mapper: MapperRepo < FromKey , FromValue , ToKey , ToValue >) : ReadKeyValuesRepo < FromKey , FromValue > , MapperRepo < FromKey , FromValue , ToKey , ToValue >

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.

MapperWriteCRUDRepo
Link copied to clipboard
open class MapperWriteCRUDRepo < FromId , FromRegistered , FromInput , ToId , ToRegistered , ToInput >(to: WriteCRUDRepo < ToRegistered , ToId , ToInput >, mapper: MapperRepo < FromId , FromRegistered , ToId , ToRegistered >, inputMapper: SimpleSuspendableMapper < FromInput , ToInput >) : WriteCRUDRepo < FromRegistered , FromId , FromInput > , MapperRepo < FromId , FromRegistered , ToId , ToRegistered > , SimpleSuspendableMapper < FromInput , ToInput >

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.

MapperWriteKeyValueRepo
Link copied to clipboard
open class MapperWriteKeyValueRepo < FromKey , FromValue , ToKey , ToValue >(to: WriteKeyValueRepo < ToKey , ToValue >, mapper: MapperRepo < FromKey , FromValue , ToKey , ToValue >) : WriteKeyValueRepo < FromKey , FromValue > , MapperRepo < FromKey , FromValue , ToKey , ToValue >

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.

MapperWriteKeyValuesRepo
Link copied to clipboard
open class MapperWriteKeyValuesRepo < FromKey , FromValue , ToKey , ToValue >(to: WriteKeyValuesRepo < ToKey , ToValue >, mapper: MapperRepo < FromKey , FromValue , ToKey , ToValue >) : WriteKeyValuesRepo < FromKey , FromValue > , MapperRepo < FromKey , FromValue , ToKey , ToValue >

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

withMapper
Link copied to clipboard
inline fun < FromKey , FromValue , ToKey , ToValue > KeyValueRepo < ToKey , ToValue >. withMapper (mapper: MapperRepo < FromKey , FromValue , ToKey , ToValue >): KeyValueRepo < FromKey , FromValue >

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

inline fun < FromKey , FromValue , ToKey , ToValue > KeyValuesRepo < ToKey , ToValue >. withMapper (mapper: MapperRepo < FromKey , FromValue , ToKey , ToValue >): KeyValuesRepo < FromKey , FromValue >

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

inline fun < FromKey , FromValue , ToKey , ToValue > ReadCRUDRepo < ToValue , ToKey >. withMapper (mapper: MapperRepo < FromKey , FromValue , ToKey , ToValue >): ReadCRUDRepo < FromValue , FromKey >

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

inline fun < FromKey , FromValue , ToKey , ToValue > ReadKeyValueRepo < ToKey , ToValue >. withMapper (mapper: MapperRepo < FromKey , FromValue , ToKey , ToValue >): ReadKeyValueRepo < FromKey , FromValue >

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

inline fun < FromKey , FromValue , ToKey , ToValue > ReadKeyValuesRepo < ToKey , ToValue >. withMapper (mapper: MapperRepo < FromKey , FromValue , ToKey , ToValue >): ReadKeyValuesRepo < FromKey , FromValue >

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

inline fun < FromKey , FromValue , ToKey , ToValue > WriteKeyValueRepo < ToKey , ToValue >. withMapper (mapper: MapperRepo < FromKey , FromValue , ToKey , ToValue >): WriteKeyValueRepo < FromKey , FromValue >

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

inline fun < FromKey , FromValue , ToKey , ToValue > WriteKeyValuesRepo < ToKey , ToValue >. withMapper (mapper: MapperRepo < FromKey , FromValue , ToKey , ToValue >): WriteKeyValuesRepo < FromKey , FromValue >

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

inline fun < FromKey , FromValue , FromInput , ToKey , ToValue , ToInput > CRUDRepo < ToValue , ToKey , ToInput >. withMapper (mapper: MapperRepo < FromKey , FromValue , ToKey , ToValue >, simpleSuspendableMapper: SimpleSuspendableMapper < FromInput , ToInput >): CRUDRepo < FromValue , FromKey , FromInput >
inline fun < FromKey , FromValue , FromInput , ToKey , ToValue , ToInput > WriteCRUDRepo < ToValue , ToKey , ToInput >. withMapper (mapper: MapperRepo < FromKey , FromValue , ToKey , ToValue >, simpleSuspendableMapper: SimpleSuspendableMapper < FromInput , ToInput >): WriteCRUDRepo < FromValue , FromKey , FromInput >
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.