IDBCursor extension type
Note: Not to be confused with IDBCursorWithValue which is just an
IDBCursor
interface with an additionalvalue
property.
The IDBCursor
interface of the
IndexedDB API
represents a
cursor
for traversing or iterating over multiple records in a database.
The cursor has a source that indicates which index or object store it is iterating over. It has a position within the range, and moves in a direction that is increasing or decreasing in the order of record keys. The cursor enables an application to asynchronously process all the records in the cursor's range.
You can have an unlimited number of cursors at the same time. You always get
the same IDBCursor
object representing a given cursor. Operations are
performed on the underlying index or object store.
- on
- Implemented types
- Implementers
Properties
- direction → IDBCursorDirection
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → JSAny?
-
no setter
- primaryKey → JSAny?
-
no setter
- request → IDBRequest
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → JSObject
-
no setter
Methods
-
advance(
int count) → void -
The
advance()
method of the IDBCursor interface sets the number of times a cursor should move its position forward. -
continue_(
[JSAny? key]) → void -
The
continue()
method of the IDBCursor interface advances the cursor to the next position along its direction, to the item whose key matches the optional key parameter. If no key is specified, the cursor advances to the immediate next position, based on its direction. -
continuePrimaryKey(
JSAny? key, JSAny? primaryKey) → void -
The
continuePrimaryKey()
method of the IDBCursor interface advances the cursor to the item whose key matches the key parameter as well as whose primary key matches the primary key parameter. -
delete(
) → IDBRequest -
The
delete()
method of the IDBCursor interface returns an IDBRequest object, and, in a separate thread, deletes the record at the cursor's position, without changing the cursor's position. Once the record is deleted, the cursor's value is set to null. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
JSAny? value) → IDBRequest -
The
update()
method of the IDBCursor interface returns an IDBRequest object, and, in a separate thread, updates the value at the current position of the cursor in the object store. If the cursor points to a record that has just been deleted, a new record is created.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited