Module transaction
Transaction implementation, keeping track of modifications within a transaction and providing functionality for committing or rolling back.
Transaction (store)
Returns a newly created Transaction instance
Parameters
store |
Returns
A newly created Transaction instance |
Transaction.prototype.collections
Contains the collections modified in this transaction
Transaction.prototype.commit ()
Commits all changes made in this transaction, and releases the connection
used by this transaction. This method must not be called directly, instead
use Store.prototype.commitTransaction()
.
Transaction.prototype.deleted
Contains the keys of deleted objects
Transaction.prototype.inserted
Contains the keys of inserted objects
Transaction.prototype.isDirty ()
Returns true if this transaction is dirty
Returns
Boolean | True if this transaction is dirty |
Transaction.prototype.keys
Contains the list of keys of all objects modified in this transaction
Transaction.prototype.rollback ()
Rolls back all changes made in this transaction, and releases the
connection used by this transaction. This method must not be called
directly, instead use Store.prototype.abortTransaction()
.
Transaction.prototype.store
The store
Transaction.prototype.updated
Contains the keys of updated objects