Module

Database.IndexedDB.IDBCursor

Package
purescript-indexed-db
Repository
ilyakooo0/purescript-indexed-DB

A cursor is used to iterate over a range of records in an index or an object store in a specific direction.

#advance Source

advance :: forall cursor. IDBCursor cursor => cursor -> Int -> Aff Unit

Advances the cursor through the next count records in range.

#continue Source

continue :: forall k cursor. IDBKey k => IDBCursor cursor => cursor -> Maybe k -> Aff Unit

Advances the cursor to the next record in range matching or after key.

#continuePrimaryKey Source

continuePrimaryKey :: forall k cursor. IDBKey k => IDBCursor cursor => cursor -> k -> k -> Aff Unit

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 Source

delete :: forall cursor. IDBCursor cursor => cursor -> Aff Unit

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

#update Source

update :: forall val cursor. IDBCursor cursor => cursor -> val -> Aff Key

Update 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.

#direction Source

direction :: forall cursor. IDBConcreteCursor cursor => cursor -> CursorDirection

Returns the direction (Next|NextUnique|Prev|PrevUnique) of the cursor.

#key Source

key :: forall cursor. IDBConcreteCursor cursor => cursor -> Aff Key

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

#primaryKey Source

primaryKey :: forall cursor. IDBConcreteCursor cursor => cursor -> Aff Key

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

#source Source

source :: forall cursor. IDBConcreteCursor cursor => cursor -> CursorSource

Returns the IDBObjectStore or IDBIndex the cursor was opened from.

#value Source

value :: forall val. ValueCursor -> val