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.

(store: Store): boolean
TypeDescription
storeStore

A reference to the Store that is completing a transaction.

returnsboolean

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

Since v5.0, this function is called with the Store as a single argument. You can use the getTransactionChanges method and getTransactionLog method of the Store directly to decide whether to do the rollback.

Since

v1.0.0