Firebase. Firestore. Transaction
A transaction, as created by FirebaseFirestore.RunTransactionAsync{T}(System.Func{Transaction, Task{T}}) (and overloads) and passed to user code.
Summary
Properties | |
---|---|
Firestore | The database for this transaction. |
Public functions | |
---|---|
Delete(DocumentReference documentReference) | void Deletes the document referenced by the provided DocumentReference . |
GetSnapshotAsync(DocumentReference documentReference) | Task< DocumentSnapshot > Read a snapshot of the document specified by documentReference , with respect to this transaction. |
Set(DocumentReference documentReference, object documentData, SetOptions options) | void Writes to the document referred to by the provided DocumentReference . |
Update(DocumentReference documentReference, IDictionary< string, object > updates) | void Updates fields in the document referred to by the provided DocumentReference . |
Update(DocumentReference documentReference, string field, object value) | void Updates the field in the document referred to by the provided DocumentReference . |
Update(DocumentReference documentReference, IDictionary< FieldPath, object > updates) | void Updates fields in the document referred to by the provided DocumentReference . |
Properties
Public functions
Delete
void Delete( DocumentReference documentReference )
Deletes the document referenced by the provided DocumentReference
.
Details | |||
---|---|---|---|
Parameters |
|
GetSnapshotAsync
Task< DocumentSnapshot > GetSnapshotAsync( DocumentReference documentReference )
Read a snapshot of the document specified by documentReference , with respect to this transaction.
This method cannot be called after any write operations have been created.
Details | |||
---|---|---|---|
Parameters |
| ||
Returns | A snapshot of the given document with respect to this transaction. |
Set
void Set( DocumentReference documentReference, object documentData, SetOptions options )
Writes to the document referred to by the provided DocumentReference
.
If the document does not yet exist, it will be created. If you pass options , the provided data can be merged into an existing document.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
Update
void Update( DocumentReference documentReference, IDictionary< string, object > updates )
Updates fields in the document referred to by the provided DocumentReference
.
If no document exists yet, the update will fail.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
Update
void Update( DocumentReference documentReference, string field, object value )
Updates the field in the document referred to by the provided DocumentReference
.
If no document exists yet, the update will fail.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
Update
void Update( DocumentReference documentReference, IDictionary< FieldPath, object > updates )
Updates fields in the document referred to by the provided DocumentReference
.
If no document exists yet, the update will fail.
Details | |||||
---|---|---|---|---|---|
Parameters |
|