IDBCursor

@native @JSGlobal @JSType
class IDBCursor[+S] extends IDBCursorReadOnly[S]

The IDBCursor interface of the IndexedDB API represents a cursor for traversing or iterating over multiple records in a database.

The cursor has a source that indicates which index or object store it is iterating. It has a position within the range, and moves in a direction that is increasing or decreasing in the order of record keys. The cursor enables an application to asynchronously process all the records in the cursor's range.

Type parameters:
S

The type of .source

class Object
trait Any
class Object
trait Matchable
class Any

Value members

Concrete methods

def delete(): IDBRequest[S, Unit]

Returns an IDBRequest object, and, in a separate thread, deletes the record at the cursor's position, without changing the cursor's position.

Returns an IDBRequest object, and, in a separate thread, deletes the record at the cursor's position, without changing the cursor's position.

def update(value: IDBValue): IDBRequest[S, IDBKey]

Returns an IDBRequest object, and, in a separate thread, updates the value at the current position of the cursor in the object store.

Returns an IDBRequest object, and, in a separate thread, updates the value at the current position of the cursor in the object store.

Inherited methods

def advance(count: Double): Unit

This method may raise a DOMException of one of the following types:

This method may raise a DOMException of one of the following types:

Inherited from:
IDBCursorReadOnly
def continue(key: IDBKey): Unit

Sets cursor to key if specified, otherwise advances cursor by one.

Sets cursor to key if specified, otherwise advances cursor by one.

Note:

calling this method twice from the same onsuccess handler results in a InvalidStateError DOMException being thrown on the second call W3C

Inherited from:
IDBCursorReadOnly

Is a DOMString that, on getting, returns the direction of traversal of the cursor. See Constants for possible values.

Is a DOMString that, on getting, returns the direction of traversal of the cursor. See Constants for possible values.

Inherited from:
IDBCursorReadOnly
def hasOwnProperty(v: String): Boolean
Inherited from:
Object
def isPrototypeOf(v: Object): Boolean
Inherited from:
Object
def key: IDBKey

Returns the key for the record at the cursor's position. If the cursor is outside its range, this is set to undefined. The cursor's key can be any data type.

Returns the key for the record at the cursor's position. If the cursor is outside its range, this is set to undefined. The cursor's key can be any data type.

Inherited from:
IDBCursorReadOnly

Returns the cursor's current effective key. If the cursor is currently being iterated or has iterated outside its range, this is set to undefined. The cursor's primary key can be any data type.

Returns the cursor's current effective key. If the cursor is currently being iterated or has iterated outside its range, this is set to undefined. The cursor's primary key can be any data type.

Inherited from:
IDBCursorReadOnly
def propertyIsEnumerable(v: String): Boolean
Inherited from:
Object
def source: S

On getting, this object returns the IDBObjectStore or IDBIndex that the cursor is iterating. This function never returns null or throws an exception, even if the cursor is currently being iterated, has iterated past its end, or its transaction is not active.

On getting, this object returns the IDBObjectStore or IDBIndex that the cursor is iterating. This function never returns null or throws an exception, even if the cursor is currently being iterated, has iterated past its end, or its transaction is not active.

Inherited from:
IDBCursorReadOnly
def toLocaleString(): String
Inherited from:
Object
def valueOf(): Any
Inherited from:
Object