Companion
object Companion
Functions
Link copied to clipboard
fun <T> failure(error: Throwable, errorUpdatedAt: Long = epoch(), data: T, dataUpdatedAt: Long = epoch(), dataStaleAt: Long = dataUpdatedAt): QueryState<T>
Creates a new QueryState with the QueryStatus.Failure status.
Link copied to clipboard
Creates a new QueryState with the QueryStatus.Pending status.
Link copied to clipboard
fun <T, R> QueryState.Companion.merge(states: Array<QueryState<T>>, transform: (List<T>) -> R): QueryState<R>
fun <T1, T2, R> QueryState.Companion.merge(state1: QueryState<T1>, state2: QueryState<T2>, transform: (T1, T2) -> R): QueryState<R>
fun <T1, T2, T3, R> QueryState.Companion.merge(state1: QueryState<T1>, state2: QueryState<T2>, state3: QueryState<T3>, transform: (T1, T2, T3) -> R): QueryState<R>
Merges multiple QueryState instances into a single QueryState instance.
Link copied to clipboard
fun <T> success(data: T, dataUpdatedAt: Long = epoch(), dataStaleAt: Long = dataUpdatedAt): QueryState<T>
Creates a new QueryState with the QueryStatus.Success status.
Link copied to clipboard
fun <T> test(reply: Reply<T> = Reply.None, replyUpdatedAt: Long = 0, error: Throwable? = null, errorUpdatedAt: Long = 0, staleAt: Long = 0, status: QueryStatus = QueryStatus.Pending, fetchStatus: QueryFetchStatus = QueryFetchStatus.Idle, isInvalidated: Boolean = false): QueryState<T>
Creates a new QueryState for Testing.