Transaction extension type

A reference to a transaction. The Transaction object passed to a transaction's updateFunction provides the methods to read and write data within the transaction context. See Firestore.runTransaction().

on
Implemented types
Available extensions

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

create(DocumentReference documentRef, JSObject data) Transaction
Retrieves multiple documents from Firestore. Holds a pessimistic lock on all returned documents.
delete(DocumentReference documentRef, [Precondition precondition]) Transaction
Deletes the document referred to by the provided DocumentReference.
get(Query query) JSPromise<QuerySnapshot>
Retrieves a query result. Holds a pessimistic lock on all returned documents.
getAggregateQuery(AggregateQuery aggregateQuery) JSPromise<AggregateQuerySnapshot>
Retrieves an aggregate query result. Holds a pessimistic lock on all documents that were matched by the underlying query.
getDocument(DocumentReference documentRef) JSPromise<DocumentSnapshot>
Reads the document referenced by the provided DocumentReference. Holds a pessimistic lock on the returned document.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(DocumentReference documentRef, JSObject data, [SetOptions options]) Transaction
Writes to the document referred to by the provided DocumentReference. If the document does not exist yet, it will be created. If you pass SetOptions, the provided data can be merged into the existing document.
toString() String
A string representation of this object.
inherited
update(DocumentReference documentRef, JSObject data, [Precondition precondition]) Transaction
Updates fields in the document referred to by the provided DocumentReference. The update will fail if applied to a document that does not exist.
updateFieldPath(DocumentReference documentRef, JSAny field, JSObject value, [JSArray<JSAny> precondition]) Transaction
Updates fields in the document referred to by the provided DocumentReference. The update will fail if applied to a document that does not exist.

Operators

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