Module

Dexie.DB

Package
purescript-dexie
Repository
mushishi78/purescript-dexie

#version Source

version :: forall me. MonadEffect me => Int -> DB -> me Version

Create a version definition for migrating the database schema. See Dexie.Version

Documentation: dexie.org/docs/Dexie/Dexie.version()

#table Source

table :: forall me. MonadEffect me => String -> DB -> me Table

Retrieve the Table for an object store. See Dexie.Table

Documentation: dexie.org/docs/Dexie/Dexie.table()

#tables Source

tables :: forall me. MonadEffect me => DB -> me (Array Table)

Retrieve all the Table instances for all the object stores. See Dexie.Table

Documentation: dexie.org/docs/Dexie/Dexie.tables

#transaction Source

transaction :: forall a. DB -> String -> Array String -> (Transaction -> Promise a) -> Promise a

Creates a database transaction. See Dexie.Transaction

Documentation: dexie.org/docs/Dexie/Dexie.transaction()

#open Source

open :: DB -> Promise Unit

Opens the database connection. By default, db.open() will be called automatically on first query to the db.

Documentation: dexie.org/docs/Dexie/Dexie.open()

#close Source

close :: forall me. MonadEffect me => DB -> me Unit

Closes the database. This operation completes immediately.

Documentation: dexie.org/docs/Dexie/Dexie.close()

#onBlocked Source

onBlocked :: forall me. MonadEffect me => Effect Unit -> DB -> me Unit

The “blocked” event occurs if database upgrade is blocked by another tab or browser window keeping a connection open towards the database

Documentation: dexie.org/docs/Dexie/Dexie.on.blocked

#onReady Source

onReady :: forall me. MonadEffect me => Effect Unit -> DB -> me Unit

Callback executed when database has successfully opened.

Documentation: dexie.org/docs/Dexie/Dexie.on.ready

#onVersionChange Source

onVersionChange :: forall me. MonadEffect me => Effect Unit -> DB -> me Unit

The “versionchange” event occurs if another indexedDB database instance needs to upgrade or delete the database.

Documentation: dexie.org/docs/Dexie/Dexie.on.versionchange

#waitUntilReady Source

waitUntilReady :: forall ma. MonadAff ma => DB -> ma Unit

Helper to wait for onReady in MonadAff