Firebase. Database. TransactionResult
Instances of this class represent the desired outcome of a single Run of a transaction.
Summary
Pass a handler to DatabaseReference.RunTransaction, and in your handler, you can either:
- Set the data to the new value (success) via TransactionResult.Success(MutableData)
- abort the transaction via TransactionResult.Abort()
Properties |
|
---|---|
IsSuccess
|
bool
Whether or not this result is a success.
|
Public static functions |
|
---|---|
Abort()
|
Aborts the transaction run with DatabaseReference.RunTransaction and returns an aborted TransactionResult which can be returned from RunTransaction.
|
Success(MutableData resultData)
|
Builds a successful result to be returned from the handler passed to DatabaseReference.RunTransaction.
|
Properties
IsSuccess
bool IsSuccess
Whether or not this result is a success.
Public static functions
Abort
TransactionResult Abort()
Aborts the transaction run with DatabaseReference.RunTransaction and returns an aborted TransactionResult which can be returned from RunTransaction.
Success
TransactionResult Success( MutableData resultData )
Builds a successful result to be returned from the handler passed to DatabaseReference.RunTransaction.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A TransactionResult indicating the new data to be stored at the location.
|