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

MDN Reference

interface IDBCursorWithValue {
    direction: IDBCursorDirection;
    key: IDBValidKey;
    primaryKey: IDBValidKey;
    request: IDBRequest;
    source: IDBObjectStore | IDBIndex;
    value: any;
    advance(count: number): void;
    continue(key?: IDBValidKey): void;
    continuePrimaryKey(key: IDBValidKey, primaryKey: IDBValidKey): void;
    delete(): IDBRequest<undefined>;
    update(value: any): IDBRequest<IDBValidKey>;
}
Hierarchy
Index

Properties

The direction read-only property of the direction of traversal of the cursor (set using section below for possible values.

MDN Reference

The key read-only property of the position.

MDN Reference

primaryKey: IDBValidKey

The primaryKey read-only property of the cursor is currently being iterated or has iterated outside its range, this is set to undefined.

MDN Reference

request: IDBRequest

The request read-only property of the IDBCursor interface returns the IDBRequest used to obtain the cursor.

MDN Reference

source: IDBObjectStore | IDBIndex

The source read-only property of the null or throws an exception, even if the cursor is currently being iterated, has iterated past its end, or its transaction is not active.

MDN Reference

value: any

The value read-only property of the whatever that is.

MDN Reference

Methods

  • The advance() method of the IDBCursor interface sets the number of times a cursor should move its position forward.

    MDN Reference

    Parameters

    • count: number

    Returns void

  • The continue() method of the IDBCursor interface advances the cursor to the next position along its direction, to the item whose key matches the optional key parameter.

    MDN Reference

    Parameters

    Returns void

  • The delete() method of the IDBCursor interface returns an IDBRequest object, and, in a separate thread, deletes the record at the cursor's position, without changing the cursor's position.

    MDN Reference

    Returns IDBRequest<undefined>

  • The update() method of the IDBCursor interface returns an IDBRequest object, and, in a separate thread, updates the value at the current position of the cursor in the object store.

    MDN Reference

    Parameters

    • value: any

    Returns IDBRequest<IDBValidKey>