InfiniteQueryFactoryWithInput
class InfiniteQueryFactoryWithInput<TInput : CacheableInput.QueryInput, TPageParam, TData, TError : Throwable>(cache: OnHandCache, initialPageParam: TPageParam? = null, getNextPageParam: suspend (pages: List<PagedData<TPageParam?, TData>>) -> PageParam<TPageParam>, getPreviousPageParam: suspend (pages: List<PagedData<TPageParam?, TData>>) -> PageParam<TPageParam>? = null, dispatcher: CoroutineDispatcher = Dispatchers.Default, ttl: Duration? = null, query: suspend (input: TInput, page: TPageParam?) -> TData?)
Constructors
Link copied to clipboard
constructor(cache: OnHandCache, initialPageParam: TPageParam? = null, getNextPageParam: suspend (pages: List<PagedData<TPageParam?, TData>>) -> PageParam<TPageParam>, getPreviousPageParam: suspend (pages: List<PagedData<TPageParam?, TData>>) -> PageParam<TPageParam>? = null, dispatcher: CoroutineDispatcher = Dispatchers.Default, ttl: Duration? = null, query: suspend (input: TInput, page: TPageParam?) -> TData?)
Functions
Link copied to clipboard
fun create(startingCacheKey: TInput? = null, coroutineScope: CoroutineScope, initialFetchState: FetchState = FetchState.IDLE): CacheableInfiniteQueryWithInput<TInput, TPageParam, TData, TError>
Link copied to clipboard
operator fun invoke(startingCacheKey: TInput? = null, coroutineScope: CoroutineScope, initialFetchState: FetchState = FetchState.IDLE): CacheableInfiniteQueryWithInput<TInput, TPageParam, TData, TError>
Link copied to clipboard
fun optimisticUpdater(input: TInput, updater: (currentValue: List<PagedData<TPageParam?, TData>>?) -> List<PagedData<TPageParam?, TData>>): Map<TInput, List<PagedData<TPageParam?, TData>>?>