Skip to content

Transaction.abort()

David Fahlander edited this page Jun 18, 2014 · 3 revisions

Abort the transaction.

Sample

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