Results 1 - 17 of 17

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.)
API IDBObjectStore IndexedDB Interface Reference

IDBObjectStore.add()

To determine if the add operation has completed successfully, listen for the transaction’s complete event in addition to the IDBObjectStore.add request’s success event, because the transaction may still fail after the success event fires. In other words, the success event is only triggered when the transaction has been successfully queued.
API Database IDBObjectStore IndexedDB Method Reference storage Storage

IDBObjectStore.clear()

Clearing an object store consists of removing all records from the object store and removing all records in indexes that reference the object store.
API clear Database IDBObjectStore IndexedDB Method Reference storage Storage

IDBObjectStore.count()

An IDBRequest object on which subsequent events related to this operation are fired.
API count data Database IDBObjectStore IndexedDB Method Reference

IDBObjectStore.createIndex()

Note that this method must be called only from a VersionChange transaction mode callback.
API createIndex Database IDBObjectStore IndexedDB Method Reference storage Storage

IDBObjectStore.deleteIndex()

Note that this method must be called only from a VersionChange transaction mode callback. Note that this method synchronously modifies the IDBObjectStore.indexNames property.
API Database deleteIndex IDBObjectStore IndexedDB Method Reference storage Storage

IDBObjectStore.get()

If a value is successfully found, then a structured clone of it is created and set as the result of the request object.
API Database IDBObjectStore IndexedDB Method Reference storage Storage

IDBObjectStore.getAll()

If a value is successfully found, then a structured clone of it is created and set as the result of the request object.
API Database getAll IDBObjectStore IndexedDB Method Reference storage Storage

IDBObjectStore.getAllKeys()

If a value is successfully found, then a structured clone of it is created and set as the result of the request object.
API Database getAllKeys IDBObjectStore IndexedDB Method Reference storage Storage

IDBObjectStore.keyPath

If this property is null, the application must provide a key for each modification operation.
API Database IDBObjectStore IndexedDB keyPath Property Reference Storage storage

IDBObjectStore.openCursor()

To determine if the add operation has completed successfully, listen for the results’s success event.
API Database IDBObjectStore IndexedDB Method openCursor Reference storage Storage

IDBObjectStore.openKeyCursor()

To determine if the add operation has completed successfully, listen for the results’s success event.
API Database IDBObjectStore Method openKeyCursor Reference Référence storage Storage

IDBObjectStore.put()

If the record is successfully stored, then a success event is fired on the returned request object with the result set to the key for the stored record, and the transaction set to the transaction in which this object store is opened.
API Database IDBObjectStore IndexedDB Method put Reference storage Storage