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) | voidDeletes the document referenced by the provided DocumentReference. |
GetSnapshotAsync(DocumentReference documentReference) | Task<DocumentSnapshot >Read a snapshot of the document specified bydocumentReference , with respect to this transaction. |
Set(DocumentReference documentReference, object documentData,SetOptions options) | voidWrites to the document referred to by the provided DocumentReference. |
Update(DocumentReference documentReference, IDictionary< string, object > updates) | voidUpdates fields in the document referred to by the provided DocumentReference. |
Update(DocumentReference documentReference, string field, object value) | voidUpdates the field in the document referred to by the provided DocumentReference. |
Update(DocumentReference documentReference, IDictionary<FieldPath, object > updates) | voidUpdates fields in the document referred to by the provided DocumentReference. |
Properties
Public functions
Delete
voidDelete(DocumentReferencedocumentReference)
Deletes the document referenced by the providedDocumentReference.
| Details | |||
|---|---|---|---|
| Parameters |
|
GetSnapshotAsync
Task<DocumentSnapshot>GetSnapshotAsync(DocumentReferencedocumentReference)
Read a snapshot of the document specified bydocumentReference , 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
voidSet(DocumentReferencedocumentReference,objectdocumentData,SetOptionsoptions)
Writes to the document referred to by the providedDocumentReference.
If the document does not yet exist, it will be created. If you passoptions , the provided data can be merged into an existing document.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
Update
voidUpdate(DocumentReferencedocumentReference,IDictionary<string,object>updates)
Updates fields in the document referred to by the providedDocumentReference.
If no document exists yet, the update will fail.
| Details | |||||
|---|---|---|---|---|---|
| Parameters |
|
Update
voidUpdate(DocumentReferencedocumentReference,stringfield,objectvalue)
Updates the field in the document referred to by the providedDocumentReference.
If no document exists yet, the update will fail.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
Update
voidUpdate(DocumentReferencedocumentReference,IDictionary<FieldPath,object>updates)
Updates fields in the document referred to by the providedDocumentReference.
If no document exists yet, the update will fail.
| Details | |||||
|---|---|---|---|---|---|
| Parameters |
|
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-07-27 UTC.