bindings/indexeddb_3 library
Indexed Database API 3.0
Classes
- IDBCursor
-
Note: Not to be confused with IDBCursorWithValue which is
just an interface with an additional
value
property. - IDBCursorWithValue
- The interface of the IndexedDB API represents a cursor for traversing or iterating over multiple records in a database. It is the same as the IDBCursor, except that it includes the value property. The cursor has a source that indicates which index or object store it is iterating over. It has a position within the range, and moves in a direction that is increasing or decreasing in the order of record keys. The cursor enables an application to asynchronously process all the records in the cursor's range. You can have an unlimited number of cursors at the same time. You always get the same object representing a given cursor. Operations are performed on the underlying index or object store. Note: This feature is available in Web Workers
- IDBDatabase
- The interface of the IndexedDB API provides a connection to a database; you can use an 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. Note: This feature is available in Web Workers Note: Everything you do in IndexedDB always happens in the context of a transaction, representing interactions with data in the database. All objects in IndexedDB — including object stores, indexes, and cursors — are tied to a particular transaction. Thus, you cannot execute commands, access data, or open anything outside of a transaction.
- IDBDatabaseInfo
- IDBFactory
-
The interface of the IndexedDB API lets applications
asynchronously access the indexed databases. The object that
implements the interface is
window.indexedDB
. You open — that is, create and access — and delete a database with this object, and not directly with . Note: This feature is available in Web Workers - 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. You can retrieve records in an object store through the primary key or by using an index. An index lets you look up records in an object store using properties of the values in the object stores records other than the primary key The index is a persistent key-value storage where the value part of its records is the key part of a record in the referenced object store. The records in an index are automatically populated whenever records in the referenced object store are inserted, updated, or deleted. Each record in an index can point to only one record in its referenced object store, but several indexes can reference the same object store. When the object store changes, all indexes that refers to the object store are automatically updated. You can grab a set of keys within a range. To learn more, see IDBKeyRange. Note: This feature is available in Web Workers
- IDBIndexParameters
- IDBKeyRange
- The interface of the IndexedDB API represents a continuous interval over some data type that is used for keys. Records can be retrieved from IDBObjectStore and IDBIndex objects using keys or a range of keys. You can limit the range using lower and upper bounds. For example, you can iterate over all values of a key in the value range A–Z. A key range can be a single value or a range with upper and lower bounds or endpoints. If the key range has both upper and lower bounds, then it is bounded; if it has no bounds, it is unbounded. A bounded key range can either be open (the endpoints are excluded) or closed (the endpoints are included). To retrieve all keys within a certain range, you can use the following code constructs:
- IDBObjectStore
- The interface of the IndexedDB API represents an object store in a database. Records within an object store are sorted according to their keys. This sorting enables fast insertion, look-up, and ordered retrieval. Note: This feature is available in Web Workers
- IDBObjectStoreParameters
- IDBOpenDBRequest
-
The interface of the IndexedDB API provides access to the
results of requests to open or delete databases (performed using
IDBFactory.open
andIDBFactory.deleteDatabase
), using specific event handler attributes. Note: This feature is available in Web Workers - IDBRequest
-
The interface of the IndexedDB API provides access to results of
asynchronous requests to databases and database objects using
event handler attributes. Each reading and writing operation on a
database is done using a request.
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 instance.
All asynchronous operations immediately return an instance. Each
request has a readyState that is set to the
'pending'
state; this changes to'done'
when the request is completed or fails. When the state is set todone
, every request returns a result and an error, and an event is fired on the request. When the state is stillpending
, any attempt to access the result or error raises anInvalidStateError
exception. In plain words, all asynchronous methods return a request object. If the request has been completed successfully, the result is made available through the result property and an event indicating success is fired at the request (IDBRequest.onsuccess
). If an error occurs while performing the operation, the exception is made available through the result property and an error event is fired (IDBRequest.onerror
). The interface IDBOpenDBRequest is derived from . Note: This feature is available in Web Workers - IDBTransaction
-
The interface of the IndexedDB API provides a static,
asynchronous transaction on a database using event handler
attributes. All reading and writing of data is done within
transactions. You use IDBDatabase to start transactions, to set
the mode of the transaction (e.g. is it
readonly
orreadwrite
), and you access an IDBObjectStore to make a request. You can also use an object to abort transactions. Note: This feature is available in Web Workers - IDBTransactionOptions
- IDBVersionChangeEvent
-
The interface of the IndexedDB API indicates that the version of
the database has changed, as the result of an
IDBOpenDBRequest.onupgradeneeded
event handler function. Note: This feature is available in Web Workers - IDBVersionChangeEventInit
Extensions
- PropsIDBCursor on IDBCursor
- PropsIDBCursorWithValue on IDBCursorWithValue
- PropsIDBDatabase on IDBDatabase
- PropsIDBDatabaseInfo on IDBDatabaseInfo
- PropsIDBFactory on IDBFactory
- PropsIDBIndex on IDBIndex
- PropsIDBIndexParameters on IDBIndexParameters
- PropsIDBKeyRange on IDBKeyRange
- PropsIDBObjectStore on IDBObjectStore
- PropsIDBObjectStoreParameters on IDBObjectStoreParameters
- PropsIDBOpenDBRequest on IDBOpenDBRequest
- PropsIDBRequest on IDBRequest
- PropsIDBTransaction on IDBTransaction
- PropsIDBTransactionOptions on IDBTransactionOptions
- PropsIDBVersionChangeEvent on IDBVersionChangeEvent
- PropsIDBVersionChangeEventInit on IDBVersionChangeEventInit