Note that as of Firefox 40, IndexedDB transactions have relaxed durability guarantees to increase performance (see bugĀ 1112702.) Previously in a readwrite transaction IDBTransaction.oncomplete was fired only when all data was guaranteed to have been flushed to disk. In Firefox 40+ the complete event is fired after the OS has been told to write the data but potentially before that data has actually been flushed to disk. The complete event may thus be delivered quicker than before, however, there exists a small chance that the entire transaction will be lost if the OS crashes or there is a loss of system power before the data is flushed to disk. Since such catastrophic events are rare most consumers should not need to concern themselves further.

Documentation IDBTransaction by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

Variables

read onlydb:Database

The database connection with which this transaction is associated.

read onlyerror:DOMError

Returns one of several types of error when there is an unsuccessful transaction. This property is null if the transaction is not finished, is finished and successfully committed, or was aborted with IDBTransaction.abort function.

read onlymode:TransactionMode

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

read onlyobjectStoreNames:DOMStringList

Returns a DOMStringList of the names of IDBObjectStore objects.

onabort:Function

The event handler for the abort event, fired when the transaction is aborted.

oncomplete:Function

The event handler for the complete event, thrown when the transaction completes successfully.

onerror:Function

The event handler for the error event, thrown when the transaction fails to complete.

Methods

abort ():Void

Throws:

null

DOMError

objectStore (name:String):ObjectStore

Throws:

null

DOMError

Inherited Variables

Inherited Methods

Defined by EventTarget

addEventListener (type:String, listener:Function, capture:Bool = false):Void

addEventListener (type:String, listener:EventListener, capture:Bool = false, ?wantsUntrusted:Bool):Void

Throws:

null

DOMError

dispatchEvent (event:Event):Bool

Throws:

null

DOMError

removeEventListener (type:String, listener:Function, capture:Bool = false):Void

removeEventListener (type:String, listener:EventListener, capture:Bool = false):Void

Throws:

null

DOMError