A unique hash for the query. Identical queries should return the same hash value.
The query's hash string.
Adds a condition to the query to check if the specified field includes all the given values.
The name of the field to query.
The values to check for inclusion in the field array.
The query builder.
Adds a condition to the query to check if the specified field includes any of the given values.
The name of the field to query.
The values to check for inclusion in the field array.
The query builder.
Adds a condition to the query to check if the specified field does not include any of the given values.
The name of the field to query.
The values to check for non-inclusion in the field array.
The query builder.
Returns the query object built by this query builder.
Dereferences the document references in the result of this query. For example, collection.query().snapshot() returns an array of DocumentReference objects, but collection.query().dereference().snapshot() returns an array of the actual document data.
A shortcut for where(fieldName, '==', value)
The name of the field to query.
The value to compare against.
The query builder.
A shortcut for where(fieldName, '>', value)
The name of the field to query.
The value to compare against.
The query builder.
A shortcut for where(fieldName, '>=', value)
The name of the field to query.
The value to compare against.
The query builder.
A shortcut for where(fieldName, 'in', value)
The name of the field to query.
An array of values to compare against.
The query builder.
A shortcut for where(fieldName, 'like', pattern).
The name of the field to query.
The pattern to compare against. '%' matches 0 or more characters. '' matches exactly one character. '' can be used to escape '%', ''. or another ''. Note that any '' that is not followed by '%', '_', or '' is invalid.
Optional
caseSensitive: booleanWhether to use case-sensitive comparison. Defaults to true.
The query builder.
Sets a limit to the number of results returned by the query. The maximum limit is 20,000 and the default is 1,000 if none is provided.
The limit to set.
The query builder.
A shortcut for where(fieldName, '<', value)
The name of the field to query.
The value to compare against.
The query builder.
A shortcut for where(fieldName, '<=', value)
The name of the field to query.
The value to compare against.
The query builder.
A shortcut for where(fieldName, '!=', value)
The name of the field to query.
The value to compare against.
The query builder.
A shortcut for where(fieldName, 'not in', value)
The name of the field to query.
An array of values to compare against.
The query builder.
A shortcut for where(fieldName, 'not like', pattern).
The name of the field to query.
The pattern to compare against. '%' matches 0 or more characters. '' matches exactly one character. '' can be used to escape '%', ''. or another ''. Note that any '' that is not followed by '%', '_', or '' is invalid.
Optional
caseSensitive: booleanWhether to use case-sensitive comparison. Defaults to true.
The query builder.
Returns a pagination wrapper for this query.
Optional
options: Partial<PaginationOptions>The pagination options. Defaults to { subscribe: true, pageSize: 100 }
.
Returns the results of the query based on the data that is currently available on the client. This method is useful for synchronously accessing data that has already been fetched by another query. The method will return an empty array if data has not yet been populated.
An array of query results.
Serializes the active query used by the emitter.
Forces the query to return data from the server even if there is a query that already returned the requested result.
Returns a promise that resolves to the query results.
A promise that resolves to the query results.
Returns an observable that emits the query results and updates whenever the query results change unless
subscribe=false
is provided.
Important: Make sure to unsubscribe from the observable when you are done with it.
Whether to subscribe to changes to the query results. Defaults to true
.
An observable for the query results.
Adds a sort order to the query. You can add multiple sort orders to the query. The order in which you add them determines the order in which they are applied.
The name of the field to sort by.
Whether to sort in ascending order. Defaults to true.
The query builder.
Adds a condition to the query.
The name of the field to query.
The operator to use.
The value to compare against.
The query builder.
A query builder that can be used to build a query that returns a list of documents.