HTML and CSS Reference
In-Depth Information
Table B.23. IDBDatabase interface
Creates and returns a new object store or index with a given name. parameters
is an optional object with the following properties:
createObjectStore(name, [parameters])
Specifies a field in the object as a key. Each object must
have a unique key.
If true, the object store creates keys automatically via a key
Updates the version of the database. Upon invocation, returns immediately, and,
on a separate thread, runs a versionchange transaction on the connected data-
setversion (deprecated)
Immediately returns an IDBTransaction object and, on a separate thread, starts
a transaction. The parameter storeNames, an array of strings, identifies the ob-
ject stores and indexes that are to be accessible to the new transaction. The
mode parameter defines the new transaction's type of access: 'readonly' or
'readwrite'. The default is 'readonly'.
transaction(storeNames, [mode])
The version of the connected database. When a database is first created, this at-
tribute is the empty string.
Table B.24 defines the interface for the IDBEnvironment object; it has only a single at-
tribute, indexedDB . The IDBEnvironment provides access to a client-side database.
Table B.24. IDBEnvironment interface
Provides a mechanism for applications to asynchronously access the capabilities of in-
dexed databases.
Table B.25 lists the IBDIndex object method, openCursor . This method is useful for
filtering through an index. The IBDIndex provides methods to access an index of a data-
Table B.25. IDBIndex interface
Immediately returns an IDBRequest object, then, on a separate thread, creates a cursor
over the specified key range. The optional parameter range specifies the key range of the
cursor. The other optional parameter, direction, specifies the cursor's direction of move-
ment through the index.
openCursor([range], [direc-
Search WWH ::

Custom Search