createIndex method
The createIndex()
method of the
IDBObjectStore interface creates and returns a new
IDBIndex object in the connected database. It creates a new
field/column defining a new data point for each database record to
contain.
Bear in mind that IndexedDB indexes can contain any JavaScript data type; IndexedDB uses the structured clone algorithm to serialize stored objects, which allows for storage of simple and complex objects.
Note that this method must be called only from a VersionChange
transaction
mode callback.
Implementation
external IDBIndex createIndex(
String name,
JSAny keyPath, [
IDBIndexParameters options,
]);