Transaction class
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().
See: firebase.google.com/docs/reference/js/firebase.firestore.Transaction.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- jsObject → TransactionJsImpl
-
JS object.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
delete(
DocumentReference documentRef) → Transaction - Deletes the document referred to by the provided DocumentReference.
-
get(
DocumentReference documentRef) → Future< DocumentSnapshot> - Reads the document referenced by the provided DocumentReference.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
DocumentReference documentRef, Map< String, dynamic> 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
options, the provided data can be merged into the existing document. -
toString(
) → String -
A string representation of this object.
inherited
-
update(
DocumentReference documentRef, {Map< String, dynamic> ? data, List? fieldsAndValues}) → Transaction - Updates fields in the document referred to by this DocumentReference. The update will fail if applied to a document that does not exist. The value must not be null.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getInstance(
TransactionJsImpl jsObject) → Transaction -
Creates a new Transaction from a
jsObject.