createIndex

fun createIndex(name: String, keyPath: String, options: IDBIndexParameters = definedExternally): IDBIndex(source)

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.

MDN Reference


fun createIndex(name: String, keyPath: ReadonlyArray<JsString>, options: IDBIndexParameters = definedExternally): IDBIndex(source)