IDBTransaction

The IDBTransaction interface of the IndexedDB API provides a static, asynchronous transaction on a database using event handler attributes.

MDN Reference

Properties

Link copied to clipboard

The db read-only property of the IDBTransaction interface returns the database connection with which this transaction is associated.

Link copied to clipboard

The durability read-only property of the IDBTransaction interface returns the durability hint the transaction was created with.

Link copied to clipboard

The IDBTransaction.error property of the IDBTransaction interface returns the type of error when there is an unsuccessful transaction.

Link copied to clipboard

The mode read-only property of the data in the object stores in the scope of the transaction (i.e., is the mode to be read-only, or do you want to write to the object stores?) The default value is readonly.

Link copied to clipboard

The objectStoreNames read-only property of the of IDBObjectStore objects.

Functions

Link copied to clipboard
fun abort()

The abort() method of the IDBTransaction interface rolls back all the changes to objects in the database associated with this transaction.

Link copied to clipboard
fun commit()

The commit() method of the IDBTransaction interface commits the transaction if it is called on an active transaction.

Link copied to clipboard
Link copied to clipboard

The objectStore() method of the added to the scope of this transaction.

Link copied to clipboard