When a CVM instance is used, it relies on a thread-local database which can be manually retrieved using local.
The thread-local database can be set usint local-set. Originally, at thread initialization, it corresponds to
the global database which is common to all threads. Its value can also be altered using global-set.
Ultimately, the global database itself returns [[default]] unless user has set its value to another database.
Default [[database]] is an Etch instance. See convex.db.
When a CVM instance is used, it relies on a thread-local database which can be manually retrieved using [[local]]. The thread-local database can be set usint [[local-set]]. Originally, at thread initialization, it corresponds to the [[global]] database which is common to all threads. Its value can also be altered using [[global-set]]. Ultimately, the [[global]] database itself returns [[default]] unless user has set its value to another database. Default [[database]] is an Etch instance. See [[convex.db]].
(global-set db)Sets the global database returned by global.
Sets the global database returned by [[global]].
(local)Returns the thread-local database used by any CVM instance operating in the same thread.
Returns the thread-local database used by any CVM instance operating in the same thread.
(local-set db)Sets the thread-local database returned by local.
Sets the thread-local database returned by [[local]].
(local-with db & form+)Macro using local-set momentarily to execute given forms before restoring the previous thread-local database.
Macro using `local-set` momentarily to execute given forms before restoring the previous thread-local database.
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 |