Module

Database.IndexedDB.IDBCursor

Package
purescript-indexeddb
Repository
truqu/purescript-indexedDB

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 e cursor. IDBCursor cursor => cursor -> Int -> Aff (idb :: IDB | e) Unit

Advances the cursor through the next count records in range.

#continue Source

continue :: forall e k cursor. IDBKey k => IDBCursor cursor => cursor -> Maybe k -> Aff (idb :: IDB | e) Unit

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

#continuePrimaryKey Source

continuePrimaryKey :: forall e k cursor. IDBKey k => IDBCursor cursor => cursor -> k -> k -> Aff (idb :: IDB | e) 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 e cursor. IDBCursor cursor => cursor -> Aff (idb :: IDB | e) Unit

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

#update Source

update :: forall val e cursor. IDBCursor cursor => cursor -> val -> Aff (idb :: IDB | e) 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 e cursor. IDBConcreteCursor cursor => cursor -> Aff (idb :: IDB | e) Key

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

#primaryKey Source

primaryKey :: forall e cursor. IDBConcreteCursor cursor => cursor -> Aff (idb :: IDB | e) 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