openKeyCursor method

Returns a set of records, organized by the index, optionally matching values specified by a key range and matching a specified direction.

Internet Explorer 10

 

Syntax

var retVal = IDBIndex.openKeyCursor(range, direction);

Parameters

range [in, optional]

Type: IDBKeyRange

A key range limiting the cursor to a specific set of values.

direction [in, optional]

Type: DOMString

Indicates the direction of traversal and whether duplicate values are included.

ValueMeaning
"next"

The cursor contains duplicate values and is traversing key values in ascending order.

"nextunique"

The cursor contains only unique values and is traversing key values in ascending order.

"prev"

The cursor contains duplicate values and is traversing key values in descending order.

"prevunique"

The cursor contains only unique values and is traversing key values in descending order.

 

Exceptions

This method can throw the following DOMException exceptions:

Note  As of Internet Explorer 10, the code property is deprecated in favor of the name property, which is preferred for standards compliance and future compatibility.
Exception propertiesCondition
name: DataError

The values specified in the range parameter are not valid for the data source.

name: InvalidStateError
code: DOMException.INVALID_STATE_ERR (11)

The data source has been deleted or is otherwise not available.

name: TransactionInactiveError

The associated transaction is not active.

 

Standards information

See also

IDBIndex

 

 

Show: