Interface IDBCursorWithValue

    This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database. It is the same as the IDBCursor, except that it includes the value property.

    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

    Properties

    Returns the direction ("next", "nextunique", "prev" or "prevunique") of the cursor.

    MDN Reference

    Returns the key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished.

    MDN Reference

    primaryKey: IDBValidKey

    Returns the effective key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished.

    MDN Reference

    request: IDBRequest

    Returns the IDBObjectStore or IDBIndex the cursor was opened from.

    MDN Reference

    value: any

    Returns the cursor's current value.

    MDN Reference

    Methods

    • Advances the cursor through the next count records in range.

      MDN Reference

      Parameters

      • count: number

      Returns void

    • Updated the record pointed at by the cursor with a new value.

      Throws a "DataError" DOMException if the effective object store uses in-line keys and the key would have changed.

      If successful, request's result will be the record's key.

      MDN Reference

      Parameters

      • value: any

      Returns IDBRequest<IDBValidKey>