deleteIndex
Summary
This method destroys the index with the given name in the connected database. Note that this method must only be called from a “versionchange” transaction callback.
Method of apis/indexeddb/IDBObjectStoreapis/indexeddb/IDBObjectStore
Syntax
objectStore.deleteIndex(indexName);
Parameters
indexName
- Data-type
- String
Name of the index to be deleted.
Return Value
No return value
Examples
var objectStore = transaction.objectStore("ObjectStore_BookList");
objectStore.deleteIndex("priceIndex");
Notes
Throws an exception when
- This method was not called from a “versionchange” transaction callback.
- There is no index with the given name, compared in a case-sensitive manner, in the connected database.
Related specifications
- W3C IndexedDB Specification
- W3C Proposed Recommendation
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]