QueryRef

A reference to a query, see FirebaseDataConnect.query; its results can be cached and subscribed to.

Types

Link copied to clipboard

Where execute takes a query's result from.

Properties

Link copied to clipboard

Which SDK created this reference.

Link copied to clipboard

The instance this reference belongs to.

Link copied to clipboard
abstract val dataDeserializer: DeserializationStrategy<Data>

Decodes the data the operation returns.

Link copied to clipboard
abstract val dataSerializersModule: SerializersModule?

The module dataDeserializer resolves contextual serializers from, if any.

Link copied to clipboard
abstract val operationName: String

The name of the operation in the connector.

Link copied to clipboard
abstract val variables: Variables

The variables sent with the operation.

Link copied to clipboard
abstract val variablesSerializer: SerializationStrategy<Variables>

Encodes variables.

Link copied to clipboard
abstract val variablesSerializersModule: SerializersModule?

The module variablesSerializer resolves contextual serializers from, if any.

Functions

Link copied to clipboard
abstract override fun copy(operationName: String = this.operationName, variables: Variables = this.variables, dataDeserializer: DeserializationStrategy<Data> = this.dataDeserializer, variablesSerializer: SerializationStrategy<Variables> = this.variablesSerializer, callerSdkType: FirebaseDataConnect.CallerSdkType = this.callerSdkType, dataSerializersModule: SerializersModule? = this.dataSerializersModule, variablesSerializersModule: SerializersModule? = this.variablesSerializersModule): QueryRef<Data, Variables>

A copy of this reference with the given values replaced.

Link copied to clipboard
abstract operator override fun equals(other: Any?): Boolean
Link copied to clipboard
abstract suspend override fun execute(): QueryResult<Data, Variables>

Executes the query with FetchPolicy.PREFER_CACHE.

abstract suspend fun execute(fetchPolicy: QueryRef.FetchPolicy): QueryResult<Data, Variables>

Executes the query, taking the result from the cache or the server according to fetchPolicy.

Link copied to clipboard
abstract override fun hashCode(): Int
Link copied to clipboard

A subscription to the results of this query.

Link copied to clipboard
abstract override fun toString(): String
Link copied to clipboard
abstract override fun <NewData> withDataDeserializer(dataDeserializer: DeserializationStrategy<NewData>, dataSerializersModule: SerializersModule? = this.dataSerializersModule): QueryRef<NewData, Variables>

A copy of this reference decoding its data with another deserializer.

Link copied to clipboard
abstract override fun <NewVariables> withVariablesSerializer(variables: NewVariables, variablesSerializer: SerializationStrategy<NewVariables>, variablesSerializersModule: SerializersModule? = this.variablesSerializersModule): QueryRef<Data, NewVariables>

A copy of this reference with other variables, and their serializer.