CollectionReferenceFake class
Constructors
-
CollectionReferenceFake(String _path, {Future<DocumentReference<Map<String, dynamic>>> add(Map<String, dynamic>)?, DocumentReference<Map<String, dynamic>> doc(String? id)?, Where? where, FirebaseFirestore? firestore})
-
-
CollectionReferenceFake.stateful(String path, {Where? where, void onChanged(Map<String, DocumentReferenceFake> documents)?, Duration latency = const Duration(milliseconds: 100)})
-
factory
Properties
-
firestore
→ FirebaseFirestore
-
The
FirebaseFirestore
instance of this query.
no setteroverride
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
id
→ String
-
Returns the ID of the referenced collection.
no setteroverride
-
parameters
→ Map<String, dynamic>
-
Exposes the parameters on the query delegate.
no setteroverride
-
parent
→ DocumentReference<Map<String, dynamic>>?
-
Returns the parent
DocumentReference
of this collection or null
.
no setteroverride
-
path
→ String
-
A string containing the slash-separated path to this CollectionReference
(relative to the root of the database).
no setteroverride
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
add(Map<String, dynamic> data)
→ Future<DocumentReference<Map<String, dynamic>>>
-
Returns a
DocumentReference
with an auto-generated ID, after
populating it with provided data
.
override
-
aggregate(AggregateField aggregateField1, [AggregateField? aggregateField2, AggregateField? aggregateField3, AggregateField? aggregateField4, AggregateField? aggregateField5, AggregateField? aggregateField6, AggregateField? aggregateField7, AggregateField? aggregateField8, AggregateField? aggregateField9, AggregateField? aggregateField10, AggregateField? aggregateField11, AggregateField? aggregateField12, AggregateField? aggregateField13, AggregateField? aggregateField14, AggregateField? aggregateField15, AggregateField? aggregateField16, AggregateField? aggregateField17, AggregateField? aggregateField18, AggregateField? aggregateField19, AggregateField? aggregateField20, AggregateField? aggregateField21, AggregateField? aggregateField22, AggregateField? aggregateField23, AggregateField? aggregateField24, AggregateField? aggregateField25, AggregateField? aggregateField26, AggregateField? aggregateField27, AggregateField? aggregateField28, AggregateField? aggregateField29, AggregateField? aggregateField30])
→ AggregateQuery
-
Calculates the specified aggregations over the documents in the
result set of the given query, without actually downloading the documents.
inherited
-
count()
→ AggregateQuery
-
override
-
doc([String? path])
→ DocumentReference<Map<String, dynamic>>
-
Returns a
DocumentReference
with the provided path.
override
-
endAt(Iterable<Object?> values)
→ Query<Map<String, dynamic>>
-
Takes a list of
values
, creates and returns a new Query
that ends at the
provided fields relative to the order of the query.
override
-
endAtDocument(DocumentSnapshot<Object?> documentSnapshot)
→ Query<Map<String, dynamic>>
-
Creates and returns a new
Query
that ends at the provided document
(inclusive). The end position is relative to the order of the query.
The document must contain all of the fields provided in the orderBy of
this query.
override
-
endBefore(Iterable<Object?> values)
→ Query<Map<String, dynamic>>
-
Takes a list of
values
, creates and returns a new Query
that ends before
the provided fields relative to the order of the query.
override
-
endBeforeDocument(DocumentSnapshot<Object?> documentSnapshot)
→ Query<Map<String, dynamic>>
-
Creates and returns a new
Query
that ends before the provided document
snapshot (exclusive). The end position is relative to the order of the query.
The document must contain all of the fields provided in the orderBy of
this query.
override
-
get([GetOptions? options])
→ Future<QuerySnapshot<Map<String, dynamic>>>
-
Fetch the documents for this query.
override
-
limit(int limit)
→ Query<Map<String, dynamic>>
-
Creates and returns a new Query that's additionally limited to only return up
to the specified number of documents.
override
-
limitToLast(int limit)
→ Query<Map<String, dynamic>>
-
Creates and returns a new Query that only returns the last matching documents.
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
orderBy(Object field, {bool descending = false})
→ Query<Map<String, dynamic>>
-
Creates and returns a new
Query
that's additionally sorted by the specified
field
.
The field may be a String representing a single field name or a FieldPath
.
override
-
snapshots({bool includeMetadataChanges = false})
→ Stream<QuerySnapshot<Map<String, dynamic>>>
-
Notifies of query results at this location.
override
-
startAfter(Iterable<Object?> values)
→ Query<Map<String, dynamic>>
-
Takes a list of
values
, creates and returns a new Query
that starts
after the provided fields relative to the order of the query.
override
-
startAfterDocument(DocumentSnapshot<Object?> documentSnapshot)
→ Query<Map<String, dynamic>>
-
Creates and returns a new
Query
that starts after the provided document
(exclusive). The starting position is relative to the order of the query.
The documentSnapshot
must contain all of the fields provided in the orderBy of
this query.
override
-
startAt(Iterable<Object?> values)
→ Query<Map<String, dynamic>>
-
Takes a list of
values
, creates and returns a new Query
that starts at
the provided fields relative to the order of the query.
override
-
startAtDocument(DocumentSnapshot<Object?> documentSnapshot)
→ Query<Map<String, dynamic>>
-
Creates and returns a new
Query
that starts at the provided document
(inclusive). The starting position is relative to the order of the query.
The document must contain all of the fields provided in the orderBy of
this query.
override
-
toString()
→ String
-
A string representation of this object.
inherited
-
where(Object field, {Object? isEqualTo, Object? isNotEqualTo, Object? isLessThan, Object? isLessThanOrEqualTo, Object? isGreaterThan, Object? isGreaterThanOrEqualTo, Object? arrayContains, Iterable<Object?>? arrayContainsAny, Iterable<Object?>? whereIn, Iterable<Object?>? whereNotIn, bool? isNull})
→ Query<Map<String, dynamic>>
-
Creates and returns a new
Query
with additional filter on specified
field
. field
refers to a field in a document.
override
-
withConverter<R extends Object?>({required FromFirestore<R> fromFirestore, required ToFirestore<R> toFirestore})
→ CollectionReference<R>
-
Transforms a
CollectionReference
to manipulate a custom object instead
of a Map<String, dynamic>
.
override