Query

open class Query(source)

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The underlying Firebase Android SDK object.

Link copied to clipboard
open val compat: Query

The Android-SDK-shaped com.google.firebase.firestore.Query this wraps.

Link copied to clipboard
val Query.ios: FIRQuery

The underlying Firebase iOS SDK object.

Link copied to clipboard

The underlying Firebase JS SDK object.

The underlying Firebase JS SDK object.

Link copied to clipboard

Functions

Link copied to clipboard
suspend fun average(field: FieldPath): Double?
suspend fun average(field: String): Double?
Link copied to clipboard
suspend fun count(): Long
Link copied to clipboard
fun endAt(document: DocumentSnapshot): Query
fun endAt(vararg fieldValues: Any?): Query
fun endAt(vararg fieldValues: Any?, buildSettings: EncodeSettings.Builder.() -> Unit): Query
Link copied to clipboard

Creates and returns a new Query that ends at the provided fields relative to the order of the query. The field values are configured using a FieldValuesDSL. The order of the field values must match the order of the orderBy clauses of the query

Link copied to clipboard
fun endBefore(vararg fieldValues: Any?): Query
fun endBefore(vararg fieldValues: Any?, buildSettings: EncodeSettings.Builder.() -> Unit): Query
Link copied to clipboard

Creates and returns a new Query that ends before the provided fields relative to the order of the query. The field values are configured using a FieldValuesDSL. The order of the field values must match the order of the orderBy clauses of the query

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
suspend fun get(source: Source = Source.DEFAULT): QuerySnapshot
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun limit(limit: Number): Query
Link copied to clipboard
fun limitToLast(limit: Number): Query
Link copied to clipboard
fun orderBy(field: FieldPath, direction: Direction = Direction.ASCENDING): Query
fun orderBy(field: String, direction: Direction = Direction.ASCENDING): Query
Link copied to clipboard
fun snapshots(includeMetadataChanges: Boolean = false): Flow<QuerySnapshot>
Link copied to clipboard
fun startAfter(vararg fieldValues: Any?): Query
fun startAfter(vararg fieldValues: Any?, buildSettings: EncodeSettings.Builder.() -> Unit): Query
Link copied to clipboard

Creates and returns a new Query that starts after the provided fields relative to the order of the query. The field values are configured using a FieldValuesDSL. The order of the field values must match the order of the orderBy clauses of the query

Link copied to clipboard
fun startAt(vararg fieldValues: Any?): Query
fun startAt(vararg fieldValues: Any?, buildSettings: EncodeSettings.Builder.() -> Unit): Query
Link copied to clipboard

Creates and returns a new Query that starts at the provided fields relative to the order of the query. The field values are configured using a FieldValuesDSL. The order of the field values must match the order of the orderBy clauses of the query

Link copied to clipboard
suspend fun sum(field: FieldPath): Double
suspend fun sum(field: String): Double
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun where(builder: FilterBuilder.() -> Filter?): Query
Link copied to clipboard
fun Query.where(path: FieldPath, equalTo: Any?): Query
fun Query.where(field: String, equalTo: Any?): Query
fun Query.where(path: FieldPath, inArray: List<Any>? = null, arrayContainsAny: List<Any>? = null): Query
fun Query.where(field: String, inArray: List<Any>? = null, arrayContainsAny: List<Any>? = null): Query
fun Query.where(path: FieldPath, lessThan: Any? = null, greaterThan: Any? = null, arrayContains: Any? = null): Query
fun Query.where(field: String, lessThan: Any? = null, greaterThan: Any? = null, arrayContains: Any? = null): Query