Module

Database.IndexedDB.IDBTransaction

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

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

#abort Source

abort :: forall tx. IDBTransaction tx => tx -> Aff 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. IDBTransaction tx => tx -> String -> Aff 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 :: Transaction -> Effect Unit -> Aff Unit

Event handler for the abort event.

#onComplete Source

onComplete :: Transaction -> Effect Unit -> Aff Unit

Event handler for the complete event.

#onError Source

onError :: Transaction -> (Error -> Effect Unit) -> Aff Unit

Event handler for the error event.