FirestoreDocumentBackend class

A DocumentBackend on Cloud Firestore.

Implemented types

Constructors

FirestoreDocumentBackend(FirebaseFirestore firestore, {void onRead(String operation)?, void onWrite(String operation)?})

Properties

firestore → FirebaseFirestore
final
hashCode → int
The hash code for this object.
no setterinherited
maxBatchWrites → int
The most writes one commit takes.
no setteroverride
onRead → void Function(String operation)?
Counts reads and writes (usage stats), by operation.
final
onWrite → void Function(String operation)?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

aggregate(String collection, CloudQuery query, CloudAggregate operation, String field) → Future<num?>
operation over query's documents (field for sum and average), computed by the store.
override
commit(List<DocumentWrite> writes) → Future<void>
Applies writes at once.
override
get(String collection, String id) → Future<Map<String, Object?>?>
The document id of collection, or null when it doesn't exist.
override
newId(String collection) → String
A new, unused document id for collection.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query(String collection, CloudQuery query) → Future<List<CloudDocument>>
The documents of collection that query selects.
override
toString() → String
A string representation of this object.
inherited
watch(String collection, String id) → Stream<Map<String, Object?>?>
The document, now and on every change (null while it doesn't exist).
override
watchQuery(String collection, CloudQuery query) → Stream<List<CloudDocument>>
query's documents, now and on every change.
override

Operators

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

Static Methods

applyQuery(Query<Map<String, dynamic>> ref, CloudQuery query) → Query<Map<String, dynamic>>
ref narrowed by query's filters, sorts and limit.