class js.html.idb.Transaction extends EventTarget

Available on js

The IDBTransaction interface of the IndexedDB API provides a static, asynchronous transaction on a database using event handler attributes. All reading and writing of data are done within transactions. You actually use IDBDatabase to start transactions and use IDBTransaction to set the mode of the transaction and access an object store and make your request. You can also use it to abort transactions.

Inherits from: EventTarget



Documentation for this class was provided by MDN.

Class Fields

static var READ_ONLY:Int

Allows data to be read but not changed. 

static var READ_WRITE:Int

Allows reading and writing of data in existing data stores to be changed.

static var VERSION_CHANGE:Int

Allows any operation to be performed, including ones that delete and create object stores and indexes. This mode is for updating the version number of transactions that were started using the setVersion() method of IDBDatabase objects. Transactions of this mode cannot run concurrently with other transactions.

Instance Fields

var db:Database

The database connection that this transaction is associated with.

var mode:String

The mode for isolating access to data in the object stores that are in the scope of the transaction. For possible values, see Constants. The default value is READ_ONLY.

var onabort:EventListener

The event handler for the onabort event.

var oncomplete:EventListener

The event handler for the oncomplete event.

var onerror:EventListener

The event handler for the error event.

function abort():Void