Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/evt/lib/types/index.ts>dom.IDBCursor

💧EventEmitter's typesafe replacement
Go to Latest
interface dom.IDBCursor
import { type dom } from "https://deno.land/x/evt@v2.4.16/lib/types/index.ts";
const { IDBCursor } = dom;

This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database.

Properties

readonly
direction: IDBCursorDirection

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

readonly
key: IDBValidKey

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

readonly
primaryKey: IDBValidKey

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

readonly
source: IDBObjectStore | IDBIndex

Returns the IDBObjectStore or IDBIndex the cursor was opened from.

Methods

advance(count: number): void

Advances the cursor through the next count records in range.

continue(key?: IDBValidKey): void

Advances the cursor to the next record in range.

continuePrimaryKey(key: IDBValidKey, primaryKey: IDBValidKey): void

Advances the cursor to the next record in range matching or after key and primaryKey. Throws an "InvalidAccessError" DOMException if the source is not an index.

delete(): IDBRequest<undefined>

Delete the record pointed at by the cursor with a new value.

If successful, request's result will be undefined.

update(value: any): IDBRequest<IDBValidKey>

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.