Database.IndexedDB.IDBDatabase
- Package
- purescript-indexed-db
- Repository
- ilyakooo0/purescript-indexed-DB
Each origin has an associated set of databases. A database has zero or more object stores which hold the data stored in the database.
#ObjectStoreParameters Source
type ObjectStoreParameters = { autoIncrement :: Boolean, keyPath :: KeyPath }
Options provided when creating an object store.
#close Source
close :: forall db. IDBDatabase db => db -> Aff Unit
Closes the connection once all running transactions have finished.
#createObjectStore Source
createObjectStore :: forall db. IDBDatabase db => db -> StoreName -> ObjectStoreParameters -> Aff ObjectStore
Creates a new object store with the given name and options and returns a new IDBObjectStore.
Throws a "InvalidStateError" DOMException if not called within an upgrade transaction
#deleteObjectStore Source
deleteObjectStore :: forall db. IDBDatabase db => db -> StoreName -> Aff ObjectStore
Deletes the object store with the given name.
Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.
#transaction Source
transaction :: forall db. IDBDatabase db => db -> Array StoreName -> TransactionMode -> Aff Transaction
Returns a new transaction with the given mode (ReadOnly|ReadWrite) and scope which in the form of an array of object store names.
#objectStoreNames Source
objectStoreNames :: Database -> Array String
Returns a list of the names of object stores in the database.
- Modules
- Database.
IndexedDB. Core - Database.
IndexedDB. IDBCursor - Database.
IndexedDB. IDBDatabase - Database.
IndexedDB. IDBFactory - Database.
IndexedDB. IDBIndex - Database.
IndexedDB. IDBKey - Database.
IndexedDB. IDBKey. Internal - Database.
IndexedDB. IDBKeyRange - Database.
IndexedDB. IDBObjectStore - Database.
IndexedDB. IDBTransaction