class IDBIndex extends Object
The IDBIndex interface of the IndexedDB API provides asynchronous access to an index in a database. An index is a kind of object store for looking up records in another object store, called the referenced object store. You use this interface to retrieve data.
You can retrieve records in an object store through their keys or by using an index (cursors provide a third way: see IDBCursor). An index lets you look up records in an object store using properties of the values in the object stores records.
The index is a persistent key-value storage where the value part of its records is the key part of a record in the referenced object store. The records in an index are automatically populated whenever records in the referenced object store are inserted, updated, or deleted. Each record in an index can point to only one record in its referenced object store, but several indexes can reference the same object store. When the object store changes, all indexes that refers to the object store are automatically updated.
MDN
- Annotations
- @JSType() @native() @JSGlobal()
- Alphabetic
- By Inheritance
- IDBIndex
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new IDBIndex()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def count(): IDBRequest
If you want to see how many records are between keys 1000 and 2000 in an object store, you can write the following:
If you want to see how many records are between keys 1000 and 2000 in an object store, you can write the following:
MDN
- def count(key: Any): IDBRequest
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def get(key: Any): IDBRequest
Returns an IDBRequest object, and, in a separate thread, finds either the value in the referenced object store that corresponds to the given key or the first corresponding value, if key is a key range.
Returns an IDBRequest object, and, in a separate thread, finds either the value in the referenced object store that corresponds to the given key or the first corresponding value, if key is a key range.
MDN
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getKey(key: Any): IDBRequest
Returns an IDBRequest object, and, in a separate thread, finds either the given key or the primary key, if key is a key range.
Returns an IDBRequest object, and, in a separate thread, finds either the given key or the primary key, if key is a key range.
MDN
- def hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
- def keyPath: String
The key path of this index.
The key path of this index. If null, this index is not auto-populated.
MDN
- def name: String
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def objectStore: IDBObjectStore
The name of the object store referenced by this index.
The name of the object store referenced by this index.
MDN
- def openCursor(range: IDBKeyRange = js.native, direction: String = js.native): IDBRequest
The method sets the position of the cursor to the appropriate record, based on the specified direction.
The method sets the position of the cursor to the appropriate record, based on the specified direction.
MDN
- def openKeyCursor(range: IDBKeyRange = js.native, direction: String = js.native): IDBRequest
Returns an IDBRequest object, and, in a separate thread, creates a cursor over the specified key range, as arranged by this index.
Returns an IDBRequest object, and, in a separate thread, creates a cursor over the specified key range, as arranged by this index.
MDN
- def propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toLocaleString(): String
- Definition Classes
- Object
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unique: Boolean
If true, this index does not allow duplicate values for a key.
If true, this index does not allow duplicate values for a key.
MDN
- def valueOf(): Any
- Definition Classes
- Object
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()