continuePrimaryKey() method of the
IDBCursor interface advances the cursor to the to the item whose key
matches the key parameter as well as whose primary key matches the primary key
A typical use case, is to resume the iteration where a previous cursor has been closed, without having to compare the keys one by one.
Calling this method more than once before new cursor data has been loaded - for
continuePrimaryKey() twice from the same onsuccess handler
- results in an
InvalidStateError being thrown on the second call because
the cursor’s got value flag has been unset.
This method is only valid for cursors coming from an index. Using it for cursors coming from an object store will throw an error.
Note: This feature is available in Web Workers
- The key to position the cursor at.
- The primary key to position the cursor at.
This method may raise a
DOMException of one of the following types:
||This IDBCursor's transaction is inactive.|
The key parameter may have any of the following conditions:
||The cursor is currently being iterated or has iterated past its end.|
||The cursor's direction is not
here’s how you can resume an iteration of all articles tagged with
|Indexed Database API 2.0
The definition of 'continuePrimaryKey()' in that specification.
BCD tables only load in the browser