CacheableInfiniteQueryWithNoInput

class CacheableInfiniteQueryWithNoInput<TPageParam, TData, TError : Throwable>(coroutineScope: CoroutineScope, launchQuery: suspend (page: TPageParam?) -> TData?, initialPageParam: TPageParam? = null, getNextPageParam: suspend (pages: List<PagedData<TPageParam?, TData>>) -> PageParam<TPageParam>, getPreviousPageParam: suspend (pages: List<PagedData<TPageParam?, TData>>) -> PageParam<TPageParam>? = null, val cacheKey: CacheableInput.QueryInput, cache: OnHandCache, dispatcher: CoroutineDispatcher = Dispatchers.Default, ttl: Duration? = null, initialFetchState: FetchState = FetchState.IDLE)

Constructors

Link copied to clipboard
constructor(coroutineScope: CoroutineScope, launchQuery: suspend (page: TPageParam?) -> TData?, initialPageParam: TPageParam? = null, getNextPageParam: suspend (pages: List<PagedData<TPageParam?, TData>>) -> PageParam<TPageParam>, getPreviousPageParam: suspend (pages: List<PagedData<TPageParam?, TData>>) -> PageParam<TPageParam>? = null, cacheKey: CacheableInput.QueryInput, cache: OnHandCache, dispatcher: CoroutineDispatcher = Dispatchers.Default, ttl: Duration? = null, initialFetchState: FetchState = FetchState.IDLE)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
suspend fun fetchNextPage(onSuccess: suspend (pageData: PagedData<TPageParam?, TData>?) -> Unit? = null, onError: suspend (TError) -> Unit? = null)
Link copied to clipboard
suspend fun fetchPage(page: TPageParam, onSuccess: suspend (pageData: PagedData<TPageParam?, TData>?) -> Unit? = null, onError: suspend (TError) -> Unit? = null)
Link copied to clipboard
suspend fun fetchPreviousPage(onSuccess: suspend (pageData: PagedData<TPageParam?, TData>?) -> Unit? = null, onError: suspend (TError) -> Unit? = null)