Module

Database.IndexedDB.IDBTransaction

Package
purescript-indexeddb
Repository
truqu/purescript-indexedDB

An object store is the primary storage mechanism for storing data in a database.

#abort Source

abort :: forall tx e. IDBTransaction tx => tx -> Aff (idb :: IDB | e) Unit

Aborts the transaction. All pending requests will fail with a "AbortError" DOMException and all changes made to the database will be reverted.

#objectStore Source

objectStore :: forall tx e. IDBTransaction tx => tx -> String -> Aff (idb :: IDB | e) ObjectStore

Returns an IDBObjectStore in the transaction's scope.

#error Source

error :: Transaction -> Maybe Error

If the transaction was aborted, returns the error (a DOMException) providing the reason.

#mode Source

mode :: Transaction -> TransactionMode

Returns the mode the transaction was created with (ReadOnly|ReadWrite) , or VersionChange for an upgrade transaction.

#onAbort Source

onAbort :: forall e' e. Transaction -> Eff e' Unit -> Aff (idb :: IDB | e) Unit

Event handler for the abort event.

#onComplete Source

onComplete :: forall e' e. Transaction -> Eff e' Unit -> Aff (idb :: IDB | e) Unit

Event handler for the complete event.

#onError Source

onError :: forall e' e. Transaction -> (Error -> Eff e' Unit) -> Aff (idb :: IDB | e) Unit

Event handler for the error event.