Draft
This page is not complete.
Important: The synchronous version of the IndexedDB API was originally intended for use only with Web Workers, and was eventually removed from the spec because its need was questionable. It may however be reintroduced in the future if there is enough demand from web developers.
The IDBTransactionSync
interface of the IndexedDB API provides a synchronous transaction on a database. When an application creates an IDBTransactionSync object, it blocks until the browser is able to reserve the require database objects.
void abort() raises (IDBDatabaseException); |
void commit() raises (IDBDatabaseException); |
IDBObjectStoreSync objectStore(in DOMString name) raises (IDBDatabaseException); |
Attribute | Type | Description |
---|---|---|
db | IDBDatabaseSync | The database connection that this transaction is associated with. |
static | boolean | If true, this transaction is static; if false, this transaction is dynamic. |
Call this method to signal a need to cancel the effects of the operations performed by this transaction. When this method is called, the browser ignores all the changes performed to the objects of this database since this transaction was created.
void abort( ) raises (IDBDatabaseException);
This method can raise an IDBDatabaseException with the following code:
NON_TRANSIENT_ERR
Call this method to signal that the transaction has completed normally and satisfactorily. When this method is called, the browser durably stores all the changes performed to the objects of the database since this transaction was created.
void commit( ) raises (IDBDatabaseException);
This method can raise an IDBDatabaseException with the following codes:
NON_TRANSIENT_ERR
RECOVERABLE_ERR
Returns an object store that has already been added to the scope of this transaction.
IDBObjectStoreSync objectStore( in DOMString name ) raises (IDBDatabaseException);
IDBObjectStoreSync
The method can raise an IDBDatabaseException with the following code:
NOT_FOUND_ERR
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/IDBTransactionSync