This example shows a variety of different uses of object stores,
updating the data structure with idb.IDBObjectStore.createIndex
an onupgradeneeded function, to adding a new item to our object
with idb.IDBObjectStore.add
. For a full working example, see
To-do Notifications app (view example live.)
This example shows a variety of different uses of object stores, updating the data structure with `idb.IDBObjectStore.createIndex` an onupgradeneeded function, to adding a new item to our object with `idb.IDBObjectStore.add`. For a full working example, see To-do Notifications app (view example live.)
(add this & args)
Method.
To determine if the add operation has completed successfully, for the transaction’s complete event in addition to the IDBObjectStore.add success event, because the transaction may still fail after the event fires. In other words, the success event is only triggered the transaction has been successfully queued.
var request = objectStore.add(value); var request = objectStore.add(value, key);
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/add
Method. To determine if the add operation has completed successfully, for the transaction’s complete event in addition to the IDBObjectStore.add success event, because the transaction may still fail after the event fires. In other words, the success event is only triggered the transaction has been successfully queued. `var request = objectStore.add(value); var request = objectStore.add(value, key);` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/add`
(auto-increment this)
Property.
A web.Boolean
:
var myAutoIncrement = objectStore.autoIncrement;
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/autoIncrement
Property. A `web.Boolean`: `var myAutoIncrement = objectStore.autoIncrement;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/autoIncrement`
(clear this)
Method.
Clearing an object store consists of removing all records from
object store and removing all records in indexes that reference
object store. To remove only some of the records in a store,
idb.IDBObjectStore.delete
passing a key or idb.IDBKeyRange
.
var request = objectStore.clear();
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/clear
Method. Clearing an object store consists of removing all records from object store and removing all records in indexes that reference object store. To remove only some of the records in a store, `idb.IDBObjectStore.delete` passing a key or `idb.IDBKeyRange`. `var request = objectStore.clear();` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/clear`
(count this & args)
Method.
An idb.IDBRequest
object on which subsequent events related
this operation are fired.
var request = ObjectStore.count(); var request = ObjectStore.count(query);
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/count
Method. An `idb.IDBRequest` object on which subsequent events related this operation are fired. `var request = ObjectStore.count(); var request = ObjectStore.count(query);` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/count`
(create-index this & args)
Method.
Note that this method must be called only from a VersionChange mode callback.
var myIDBIndex = objectStore.createIndex(indexName, keyPath); var myIDBIndex = objectStore.createIndex(indexName, keyPath, objectParameters);
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/createIndex
Method. Note that this method must be called only from a VersionChange mode callback. `var myIDBIndex = objectStore.createIndex(indexName, keyPath); var myIDBIndex = objectStore.createIndex(indexName, keyPath, objectParameters);` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/createIndex`
(delete this & args)
Method.
An idb.IDBRequest
object on which subsequent events related
this operation are fired. The request.result attribute is set
undefined.
`var request = objectStore.delete(Key);
var request = objectStore.delete(KeyRange);`
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/delete
Method. An `idb.IDBRequest` object on which subsequent events related this operation are fired. The request.result attribute is set undefined. `var request = objectStore.delete(Key); var request = objectStore.delete(KeyRange);` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/delete`
(delete-index this index-name)
Method.
Note that this method must be called only from a VersionChange mode callback. Note that this method synchronously modifies the property.
objectStore.deleteIndex(indexName);
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/deleteIndex
Method. Note that this method must be called only from a VersionChange mode callback. Note that this method synchronously modifies the property. `objectStore.deleteIndex(indexName);` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/deleteIndex`
(get this key)
Method.
If a value is successfully found, then a structured clone of is created and set as the result of the request object.
var request = objectStore.get(key);
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/get
Method. If a value is successfully found, then a structured clone of is created and set as the result of the request object. `var request = objectStore.get(key);` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/get`
(get-all this & args)
Method.
If a value is successfully found, then a structured clone of is created and set as the result of the request object.
var request = objectStore.getAll(); var request = objectStore.getAll(query); var request = objectStore.getAll(query, count);
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getAll
Method. If a value is successfully found, then a structured clone of is created and set as the result of the request object. `var request = objectStore.getAll(); var request = objectStore.getAll(query); var request = objectStore.getAll(query, count);` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getAll`
(get-all-keys this & args)
Method.
If a value is successfully found, then a structured clone of is created and set as the result of the request object.
var request = objectStore.getAllKeys(); var request = objectStore.getAllKeys(query); var request = objectStore.getAllKeys(query, count);
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getAllKeys
Method. If a value is successfully found, then a structured clone of is created and set as the result of the request object. `var request = objectStore.getAllKeys(); var request = objectStore.getAllKeys(query); var request = objectStore.getAllKeys(query, count);` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getAllKeys`
(get-key this key)
Method.
If a key is successfully found, then a structured clone of it created and set as the result of the request object.
var request = objectStore.getKey(key);
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getKey
Method. If a key is successfully found, then a structured clone of it created and set as the result of the request object. `var request = objectStore.getKey(key);` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getKey`
(index this name)
Method.
An idb.IDBIndex
object for accessing the index.
var index = objectStore.index(name);
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/index
Method. An `idb.IDBIndex` object for accessing the index. `var index = objectStore.index(name);` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/index`
(index-names this)
Property.
A dom.DOMStringList
.
var myindexNames = objectStore.indexNames;
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/indexNames
Property. A `dom.DOMStringList`. `var myindexNames = objectStore.indexNames;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/indexNames`
(key-path this)
Property.
If this property is null, the application must provide a key each modification operation.
var mykeyPath = objectStore.keyPath;
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/keyPath
Property. If this property is null, the application must provide a key each modification operation. `var mykeyPath = objectStore.keyPath;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/keyPath`
(name this)
Property.
A dom.DOMString
containing the object store's name.
IDBObjectStore.name = myNewName; var myObjectStoreName = IDBObjectStore.name;
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/name
Property. A `dom.DOMString` containing the object store's name. `IDBObjectStore.name = myNewName; var myObjectStoreName = IDBObjectStore.name;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/name`
(open-cursor this & args)
Method.
To determine if the add operation has completed successfully, for the results’s success event.
var request = ObjectStore.openCursor(); var request = ObjectStore.openCursor(query); var request = ObjectStore.openCursor(query, direction);
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/openCursor
Method. To determine if the add operation has completed successfully, for the results’s success event. `var request = ObjectStore.openCursor(); var request = ObjectStore.openCursor(query); var request = ObjectStore.openCursor(query, direction);` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/openCursor`
(open-key-cursor this & args)
Method.
To determine if the add operation has completed successfully, for the results’s success event.
var request = objectStore.openKeyCursor(); var request = objectStore.openKeyCursor(query); var request = objectStore.openKeyCursor(query, direction);
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/openKeyCursor
Method. To determine if the add operation has completed successfully, for the results’s success event. `var request = objectStore.openKeyCursor(); var request = objectStore.openKeyCursor(query); var request = objectStore.openKeyCursor(query, direction);` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/openKeyCursor`
(put this & args)
Method.
The put method is an update or insert method. See the idb.IDBObjectStore.add
for an insert only method.
var request = objectStore.put(item); var request = objectStore.put(item, key);
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/put
Method. The put method is an update or insert method. See the `idb.IDBObjectStore.add` for an insert only method. `var request = objectStore.put(item); var request = objectStore.put(item, key);` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/put`
(set-auto-increment! this val)
Property.
A web.Boolean
:
var myAutoIncrement = objectStore.autoIncrement;
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/autoIncrement
Property. A `web.Boolean`: `var myAutoIncrement = objectStore.autoIncrement;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/autoIncrement`
(set-index-names! this val)
Property.
A dom.DOMStringList
.
var myindexNames = objectStore.indexNames;
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/indexNames
Property. A `dom.DOMStringList`. `var myindexNames = objectStore.indexNames;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/indexNames`
(set-key-path! this val)
Property.
If this property is null, the application must provide a key each modification operation.
var mykeyPath = objectStore.keyPath;
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/keyPath
Property. If this property is null, the application must provide a key each modification operation. `var mykeyPath = objectStore.keyPath;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/keyPath`
(set-name! this val)
Property.
A dom.DOMString
containing the object store's name.
IDBObjectStore.name = myNewName; var myObjectStoreName = IDBObjectStore.name;
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/name
Property. A `dom.DOMString` containing the object store's name. `IDBObjectStore.name = myNewName; var myObjectStoreName = IDBObjectStore.name;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/name`
(set-transaction! this val)
Property.
An idb.IDBTransaction
object.
var myTransaction = objectStore.transaction;
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/transaction
Property. An `idb.IDBTransaction` object. `var myTransaction = objectStore.transaction;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/transaction`
(transaction this)
Property.
An idb.IDBTransaction
object.
var myTransaction = objectStore.transaction;
See also: https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/transaction
Property. An `idb.IDBTransaction` object. `var myTransaction = objectStore.transaction;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/transaction`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close