CollectionReference class

Holds a reference to a data collection.

A CollectionReference is a reference to a collection in a database. It provides methods for reading from and writing to the collection. The collection can correspond to a table in a relational database or a collection in a NoSQL database.

For more information on collection references, please refer to the documentation

Properties

hashCode int
The hash code for this object.
no setterinherited
refId String
A string that uniquely identifies this collection reference.
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

doc({DocId? id, DocIdObj? idAsObject}) DocumentReference
joinQuery({required Alias alias}) JoinQueryBuilder
Creates a JoinQueryBuilder that can be used to query the collection Note that when using a join query, you have to provide an alias for the query and for every other query participating in the join.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
or(Iterable<SnapshotEmitter<DocumentReference>> queries) SnapshotEmitter<DocumentReference>
Performs an or operation on a list of queries. All the queries must target the same collection. The result is a merge of all the queries, sorted according to the sort condition of the first query. Duplicate items will be removed.
query() QueryBuilder
Creates a QueryBuilder that can be used to query this collection.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited