class js.html.idb.Cursor

Available on js

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

Documentation for this class was provided by MDN.

Class Fields

static var NEXT:Int

The cursor shows all records, including duplicates. It starts at the lower bound of the key range and moves upwards (monotonically increasing in the order of keys).

static var NEXT_NO_DUPLICATE:Int

The cursor shows all records, excluding duplicates. If multiple records exist with the same key, only the first one iterated is retrieved. It starts at the lower bound of the key range and moves upwards.

static var PREV:Int

The cursor shows all records, including duplicates. It starts at the upper bound of the key range and moves downwards (monotonically decreasing in the order of keys).

static var PREV_NO_DUPLICATE:Int

The cursor shows all records, excluding duplicates. If multiple records exist with the same key, only the first one iterated is retrieved. It starts at the upper bound of the key range and moves downwards.

Instance Fields

var direction:String

On getting, returns the direction of traversal of the cursor. See Constants for possible values.

var key:Dynamic

Returns the key for the record at the cursor's position. If the cursor is outside its range, this is undefined.

var primaryKey:Dynamic

Returns the cursor's current effective key. If the cursor is currently being iterated or has iterated outside its range, this is undefined.

var source:Any

On getting, 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.

function advance(count:Int):Void

function delete():Request

function update(value:Dynamic):Request