IndexedDBAPI
Types
idbCursorDirection
idbDatabase
This IndexedDB API interface provides a connection to a database; you can use an IDBDatabase object to open a transaction on your database then create, manipulate, and delete objects (data) in that database. The interface provides the only way to get and manage versions of the database. See IDBDatabase on MDN
Record fields
objectStoreNames
Returns a list of the names of object stores in the database. Read more on MDN
idbDatabaseInfo
Record fields
name
version
idbFactory
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.) See IDBFactory on MDN
idbIndex
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. See IDBIndex on MDN
Record fields
idbIndexParameters
Record fields
unique
multiEntry
idbObjectStore
This example shows a variety of different uses of object stores, from updating the data structure with IDBObjectStore.createIndex inside an onupgradeneeded function, to adding a new item to our object store with IDBObjectStore.add. For a full working example, see our To-do Notifications app (view example live.) See IDBObjectStore on MDN
Record fields
indexNames
Returns a list of the names of indexes in the store. Read more on MDN
autoIncrement
Returns true if the store has a key generator, and false otherwise. Read more on MDN
idbObjectStoreParameters
Record fields
keyPath
autoIncrement
idbOpenDBRequest
Also inherits methods from its parents IDBRequest and EventTarget. See IDBOpenDBRequest on MDN
Record fields
result
When a request is completed, returns the result, or undefined if the request failed. Throws a "InvalidStateError" DOMException if the request is still pending. Read more on MDN
error
When a request is completed, returns the error (a DOMException), or null if the request succeeded. Throws a "InvalidStateError" DOMException if the request is still pending. Read more on MDN
source
Returns the IDBObjectStore, IDBIndex, or IDBCursor the request was made against, or null if is was an open request. Read more on MDN
transaction
Returns the IDBTransaction the request was made within. If this as an open request, then it returns an upgrade transaction while it is running, or null otherwise. Read more on MDN
readyState
Returns "pending" until a request is complete, then returns "done". Read more on MDN
idbRequest
The request object does not initially contain any information about the result of the operation, but once information becomes available, an event is fired on the request, and the information becomes available through the properties of the IDBRequest instance. See IDBRequest on MDN
Record fields
result
When a request is completed, returns the result, or undefined if the request failed. Throws a "InvalidStateError" DOMException if the request is still pending. Read more on MDN
error
When a request is completed, returns the error (a DOMException), or null if the request succeeded. Throws a "InvalidStateError" DOMException if the request is still pending. Read more on MDN
source
Returns the IDBObjectStore, IDBIndex, or IDBCursor the request was made against, or null if is was an open request. Read more on MDN
transaction
Returns the IDBTransaction the request was made within. If this as an open request, then it returns an upgrade transaction while it is running, or null otherwise. Read more on MDN
readyState
Returns "pending" until a request is complete, then returns "done". Read more on MDN
idbRequestReadyState
idbTransaction
Record fields
objectStoreNames
Returns a list of the names of object stores in the transaction's scope. For an upgrade transaction this is all object stores in the database. Read more on MDN
mode
Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction. Read more on MDN
error
If the transaction was aborted, returns the error (a DOMException) providing the reason. Read more on MDN