HTML and CSS Reference
In-Depth Information
Table B.23. IDBDatabase interface
Attribute/method
Description
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.
keyPath
If true, the object store creates keys automatically via a key
generator.
autoIncrement
Updates the version of the database. Upon invocation, returns immediately, and,
on a separate thread, runs a versionchange transaction on the connected data-
base.
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.
version
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
Attribute/method
Description
Provides a mechanism for applications to asynchronously access the capabilities of in-
dexed databases.
indexedDB
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-
base.
Table B.25. IDBIndex interface
Attribute/method
Description
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-
tion])
 
 
 
Search WWH ::




Custom Search