A DOMString containing the name of the connected database.
A DOMStringList containing a list of the names of the object stores currently in the connected database.
This example shows an IDBOpenDBRequest.onupgradeneeded block that creates a new object store; it also includes onerror and onabort functions to handle non-success cases.
This example shows an IDBOpenDBRequest.onupgradeneeded block that creates a new object store; it also includes onerror and onabort functions to handle non-success cases.
This example shows an IDBOpenDBRequest.onupgradeneeded block that creates a new object store; it also includes onerror and onabort functions to handle non-success cases, and an onversionchange function to notify when a database structure change has occurred.
An integer containing the version of the connected database.
In the following code snippet, we make a request to open a database, and include handlers for the success and error cases. For a full working example, see our To-do Notifications app (view example live.)
An integer that indicates the result of the comparison; the table below lists the possible values and their meanings:
If the database is successfully deleted, then a success event is fired on the request object returned from this method, with its result set to undefined. If an error occurs while the database is being deleted, then an error event is fired on the request object that is returned from this method.
If an error occurs while the database connection is being opened, then an error event is fired on the request object returned from this method.
IDBIndex interface of the IndexedDB API provides asynchronous access to an index in a database. An index is a kind of object store for looking up records in another object store, called the referenced object store. You use this interface to retrieve data.
A IDBRequest object on which subsequent events related to this operation are fired.
If a value is successfully found, then a structured clone of it is created and set as the result of the request object: this returns the record the key is associated with.
There is a performance cost associated with looking at the value property of a cursor, because the object is created lazily. To use a feature like getAll(), Gecko would have to create all the objects at once. If you were just interested in looking at each of the keys, for instance, it would be much more efficient to use a cursor. If you were trying to get an array of all the objects in an object store, though, you could use getAll().
If a key is successfully found it is set as the result of the request object: this returns the primary key of the record the key is associated with, not the whole record as IDBIndex.get does.
The isAutoLocale read-only property of the IDBIndex interface returns a Boolean indicating whether the index had a locale value of auto specified upon its creation (see createIndex()'s optionalParameters.)
Any data type that can be used as a key path.
The locale read-only property of the IDBIndex interface returns the locale of the index (for example en-US, or pl) if it had a locale value specified upon its creation (see createIndex()'s optionalParameters.) Note that this property always returns the current locale being used in this index, in other words, it never returns "auto".