QueryState

data class QueryState<T> : QueryModel<T>

State for managing the execution result of Query.

Types

Link copied to clipboard
object Companion
Link copied to clipboard
value class OmitKey(val name: String)

Properties

Link copied to clipboard
open override val error: Throwable? = null

The error that occurred.

Link copied to clipboard
open override val errorUpdatedAt: Long = 0

The timestamp when the error occurred.

Link copied to clipboard
open override val fetchStatus: QueryFetchStatus

The fetch status of the query.

Link copied to clipboard
open val isFailure: Boolean

Returns true if the query is a failure, false otherwise.

Link copied to clipboard

Returns true if the query is fetching, false otherwise.

Link copied to clipboard
open override val isInvalidated: Boolean = false

Returns true if the query is invalidated, false otherwise.

Link copied to clipboard
open val isPending: Boolean

Returns true if the query is pending, false otherwise.

Link copied to clipboard
open val isSuccess: Boolean

Returns true if the query is successful, false otherwise.

Link copied to clipboard

Returns true if the query is validating, false otherwise.

Link copied to clipboard
open override val reply: Reply<T>

The return value from the data source.

Link copied to clipboard
open override val replyUpdatedAt: Long = 0

The timestamp when the data was updated.

Link copied to clipboard
open val revision: String

The revision of the currently snapshot.

Link copied to clipboard
open override val staleAt: Long = 0

The timestamp when the data is considered stale.

Link copied to clipboard
open override val status: QueryStatus

The status of the query.

Functions

Link copied to clipboard
open override fun isAwaited(): Boolean

Returns true if the QueryModel is awaited.

Link copied to clipboard
open fun isPaused(currentAt: Long = epoch()): Boolean

Returns true if the query is paused, false otherwise.

Link copied to clipboard
open fun isStaled(currentAt: Long = epoch()): Boolean

Returns true if the query is staled, false otherwise.

Link copied to clipboard

Returns a new QueryState with the items included in keys omitted from the current QueryState.