CollectionReference<T> class final

Inheritance

Properties

firestore Firestore
finalinherited
hashCode int
The hash code for this object.
no setterinherited
id String
The last path element of the referenced collection.
no setter
parent DocumentReference<DocumentData>?
A reference to the containing Document if this is a subcollection, else null.
no setter
path String
A string representing the path of the referenced collection (relative to the root of the database).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(T data) Future<DocumentReference<T>>
Add a new document to this collection with the specified data, assigning it a document ID automatically.
doc([String? documentPath]) DocumentReference<T>
Gets a DocumentReference instance that refers to the document at the specified path.
endAt(List<Object?> fieldValues) Query<T>
Creates and returns a new Query that ends at the provided set of field values relative to the order of the query. The order of the provided values must match the order of the order by clauses of the query.
inherited
endAtDocument(DocumentSnapshot<Object?> snapshot) Query<T>
Creates and returns a new Query that ends at the provided set of field values relative to the order of the query. The order of the provided values must match the order of the order by clauses of the query.
inherited
endBefore(List<Object?> fieldValues) Query<T>
Creates and returns a new Query that ends before the set of field values relative to the order of the query. The order of the provided values must match the order of the order by clauses of the query.
inherited
endBeforeDocument(DocumentSnapshot<Object?> snapshot) Query<T>
Creates and returns a new Query that ends before the set of field values relative to the order of the query. The order of the provided values must match the order of the order by clauses of the query.
inherited
get() Future<QuerySnapshot<T>>
Executes the query and returns the results as a QuerySnapshot.
inherited
limit(int limit) Query<T>
Creates and returns a new Query that only returns the first matching documents.
inherited
limitToLast(int limit) Query<T>
Creates and returns a new Query that only returns the last matching documents.
inherited
listDocuments() Future<List<DocumentReference<T>>>
Retrieves the list of documents in this collection.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
offset(int offset) Query<T>
Specifies the offset of the returned results.
inherited
orderBy(Object path, {bool descending = false}) Query<T>
Creates and returns a new Query that's additionally sorted by the specified field, optionally in descending order instead of ascending.
inherited
orderByFieldPath(FieldPath fieldPath, {bool descending = false}) Query<T>
Creates and returns a new Query that's additionally sorted by the specified field, optionally in descending order instead of ascending.
inherited
select([List<FieldPath> fieldPaths = const []]) Query<DocumentData>
Creates and returns a new Query instance that applies a field mask to the result and returns only the specified subset of fields. You can specify a list of field paths to return, or use an empty list to only return the references of matching documents.
inherited
startAfter(List<Object?> fieldValues) Query<T>
Creates and returns a new Query that starts after the provided set of field values relative to the order of the query. The order of the provided values must match the order of the order by clauses of the query.
inherited
startAfterDocument(DocumentSnapshot<Object?> snapshot) Query<T>
Creates and returns a new Query that starts after the provided set of field values relative to the order of the query. The order of the provided values must match the order of the order by clauses of the query.
inherited
startAt(List<Object?> fieldValues) Query<T>
Creates and returns a new Query that starts at the provided set of field values relative to the order of the query. The order of the provided values must match the order of the order by clauses of the query.
inherited
startAtDocument(DocumentSnapshot<Object?> documentSnapshot) Query<T>
Creates and returns a new Query that starts at the provided set of field values relative to the order of the query. The order of the provided values must match the order of the order by clauses of the query.
inherited
toString() String
A string representation of this object.
inherited
where(Object path, WhereFilter op, Object? value) Query<T>
Creates and returns a new Query with the additional filter that documents must contain the specified field and that its value should satisfy the relation constraint provided.
inherited
whereFieldPath(FieldPath fieldPath, WhereFilter op, Object? value) Query<T>
Creates and returns a new Query with the additional filter that documents must contain the specified field and that its value should satisfy the relation constraint provided.
inherited
whereFilter(Filter filter) Query<T>
Creates and returns a new Query with the additional filter that documents should satisfy the relation constraint(s) provided.
inherited
withConverter<U>({required FromFirestore<U> fromFirestore, required ToFirestore<U> toFirestore}) CollectionReference<U>
Applies a custom data converter to this Query, allowing you to use your own custom model objects with Firestore. When you call get on the returned Query, the provided converter will convert between Firestore data and your custom type U.
override

Operators

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