TinyBase logoTinyBase

DoRollback

The DoRollback type describes a function that you can use to rollback the transaction if it did not complete to your satisfaction.

(
  getTransactionChanges: GetTransactionChanges,
  getTransactionLog: GetTransactionLog,
): boolean
TypeDescription
getTransactionChangesGetTransactionChanges

A function to be called to get the changes made to the Store during the transaction, since v4.0.

getTransactionLogGetTransactionLog
returnsboolean

A DoRollback can be provided when calling the transaction method or the finishTransaction method. See those methods for specific examples.

Since v4.0, this function is provided only with two functions that you can call to get information about the changes made within the transaction (in order to decide whether to do the rollback). See the GetTransactionChanges and GetTransactionLog function types for more details.