A document store in the browser's IndexedDB, for what an app keeps on the device, e.g. its state and a search index.
The documents of a store are in a database of its own, by name. A body is kept as it was put, text or bytes, and a version counts the writes of a document. A put with :if-version checks the version and writes in one transaction, and a listing reads the versions without the bodies.
A browser may clear the storage of a site when the device runs out of room, unless the site has navigator.storage.persist(), so keep there what can be made again. The store is in ClojureScript only, and each of its functions gives a promise. A put that the browser has no room for fails with ::full.
The store follows the Indexed Database API 3.0 of the W3C, https://www.w3.org/TR/IndexedDB/
A document store in the browser's IndexedDB, for what an app keeps on the device, e.g. its state and a search index. The documents of a store are in a database of its own, by name. A body is kept as it was put, text or bytes, and a version counts the writes of a document. A put with :if-version checks the version and writes in one transaction, and a listing reads the versions without the bodies. A browser may clear the storage of a site when the device runs out of room, unless the site has navigator.storage.persist(), so keep there what can be made again. The store is in ClojureScript only, and each of its functions gives a promise. A put that the browser has no room for fails with ::full. The store follows the Indexed Database API 3.0 of the W3C, https://www.w3.org/TR/IndexedDB/
(store name)The store in the IndexedDB database named name, which is made on the
first call. Each app names a database of its own, since the
databases of one site are shared by its pages.
The store keeps the database open between calls, and opens it again after it closed, e.g. for another tab that deletes it.
The store in the IndexedDB database named `name`, which is made on the first call. Each app names a database of its own, since the databases of one site are shared by its pages. The store keeps the database open between calls, and opens it again after it closed, e.g. for another tab that deletes it.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |