TransactionResult class
Stay organized with collections
Save and categorize content based on your preferences.
A type for the resolve value of runTransaction().
Signature:
export declare class TransactionResult
Properties
Property |
Modifiers |
Type |
Description |
committed |
|
boolean |
Whether the transaction was successfully committed. |
snapshot |
|
DataSnapshot |
The resulting data snapshot. |
Methods
Method |
Modifiers |
Description |
toJSON() |
|
Returns a JSON-serializable representation of this object. |
TransactionResult.committed
Whether the transaction was successfully committed.
Signature:
readonly committed: boolean;
TransactionResult.snapshot
The resulting data snapshot.
Signature:
readonly snapshot: DataSnapshot;
TransactionResult.toJSON()
Returns a JSON-serializable representation of this object.
Signature:
toJSON(): object;
Returns:
object
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-01-19 UTC.
[null,null,["Last updated 2024-01-19 UTC."],[],[],null,["# TransactionResult class\n\nA type for the resolve value of [runTransaction()](./database.md#runtransaction_a3641e5).\n\n**Signature:** \n\n export declare class TransactionResult \n\nProperties\n----------\n\n| Property | Modifiers | Type | Description |\n|-------------------------------------------------------------------------|-----------|---------------------------------------------------------------|-----------------------------------------------------|\n| [committed](./database.transactionresult.md#transactionresultcommitted) | | boolean | Whether the transaction was successfully committed. |\n| [snapshot](./database.transactionresult.md#transactionresultsnapshot) | | [DataSnapshot](./database.datasnapshot.md#datasnapshot_class) | The resulting data snapshot. |\n\nMethods\n-------\n\n| Method | Modifiers | Description |\n|---------------------------------------------------------------------|-----------|------------------------------------------------------------|\n| [toJSON()](./database.transactionresult.md#transactionresulttojson) | | Returns a JSON-serializable representation of this object. |\n\nTransactionResult.committed\n---------------------------\n\nWhether the transaction was successfully committed.\n\n**Signature:** \n\n readonly committed: boolean;\n\nTransactionResult.snapshot\n--------------------------\n\nThe resulting data snapshot.\n\n**Signature:** \n\n readonly snapshot: DataSnapshot;\n\nTransactionResult.toJSON()\n--------------------------\n\nReturns a JSON-serializable representation of this object.\n\n**Signature:** \n\n toJSON(): object;\n\n**Returns:**\n\nobject"]]