Dart API Referencedart:htmlDatabaseSync

DatabaseSync Interface

DRAFT
This page is not complete.

The DatabaseSync interface in the IndexedDB API represents a synchronous connection to a database.

Methods

Code void changeVersion(String oldVersion, String newVersion, [SQLTransactionSyncCallback callback]) #

void changeVersion(String oldVersion, String newVersion, [SQLTransactionSyncCallback callback]);

Code void readTransaction(SQLTransactionSyncCallback callback) #

void readTransaction(SQLTransactionSyncCallback callback);

Code void transaction(SQLTransactionSyncCallback callback) #

Creates and returns a transaction, acquiring locks on the given database objects, within the specified timeout duration, if possible.

IDBTransactionSync transaction (
  in optional DOMStringList storeNames,
  in optional unsigned int timeout
) raises (IDBDatabaseException);
Parameters
storeNames
The names of object stores and indexes in the scope of the new transaction.
timeout
The interval that this operation is allowed to take to acquire locks on all the objects stores and indexes identified in storeNames.
Returns
IDBTransactionSync
An object to access the newly created transaction.
Exceptions

This method can raise an IDBDatabaseException with the following code:

TIMEOUT_ERR
If reserving all the database objects identified in storeNames takes longer than the timeout interval.
void transaction(SQLTransactionSyncCallback callback);

Fields

Code final String lastErrorMessage #

final String lastErrorMessage;

Code final String version #

The version of the connected database. Has the null value when the database is first created.
final String version;

This page includes content from the Mozilla Foundation that is graciously licensed under a Creative Commons: Attribution-Sharealike license. Mozilla has no other association with Dart or dartlang.org. We encourage you to improve the web by contributing to The Mozilla Developer Network.