micro_utils.dokka
0.15.1

# MapperReadCRUDRepo

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>

## Constructors

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

## Functions

contains
Link copied to clipboard
open suspend override fun contains(id: FromId): Boolean
count
Link copied to clipboard
open suspend override fun count(): Long
getById
Link copied to clipboard
open suspend override fun getById(id: FromId): FromRegistered?
getByPagination
Link copied to clipboard
open suspend override fun getByPagination(pagination: Pagination): PaginationResult<FromRegistered>
getIdsByPagination
Link copied to clipboard
open suspend override fun getIdsByPagination(pagination: Pagination): PaginationResult<FromId>
toInnerKey
Link copied to clipboard
open suspend override fun ToId.toInnerKey(): FromId
toInnerValue
Link copied to clipboard
open suspend override fun ToRegistered.toInnerValue(): FromRegistered
toOutKey
Link copied to clipboard
open suspend override fun FromId.toOutKey(): ToId
toOutValue
Link copied to clipboard
open suspend override fun FromRegistered.toOutValue(): ToRegistered

## Properties

keyMapper
Link copied to clipboard
open override val keyMapper: SimpleSuspendableMapper<FromId, ToId>
valueMapper
Link copied to clipboard
open override val valueMapper: SimpleSuspendableMapper<FromRegistered, ToRegistered>

## Extensions

cached
Link copied to clipboard
fun <ObjectType, IdType> ReadCRUDRepo<ObjectType, IdType>.cached(kvCache: KVCache<IdType, ObjectType>, idGetter: (ObjectType) -> IdType): ReadCRUDCacheRepo<ObjectType, IdType>
fun <ObjectType, IdType> ReadCRUDRepo<ObjectType, IdType>.cached(kvCache: FullKVCache<IdType, ObjectType>, idGetter: (ObjectType) -> IdType): FullReadCRUDCacheRepo<ObjectType, IdType>
withMapper
Link copied to clipboard
inline fun <FromKey, FromValue, ToKey, ToValue> ReadCRUDRepo<ToValue, ToKey>.withMapper(mapper: MapperRepo<FromKey, FromValue, ToKey, ToValue>): ReadCRUDRepo<FromValue, FromKey>
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>