Skip to content

Transaction.abort()

David Fahlander edited this page Apr 15, 2014 · 3 revisions

Abort the transaction.

Sample

db.transaction("rw", db.friends, db.pets, function (friends, pets, trans) {
    friends.add({name: "Zlatan", shoeSize: 47});
    trans.abort(); // Will discard all changes.
}).catch(function (e) {
    // e will be an instanceof AbortError.
});
Clone this wiki locally