(conn db)Returns the underlying backend connection (a datalevin.core or datascript.core conn), for backend-specific operations dat.api doesn't wrap, e.g. datalevin.core/listen! or datalevin.core/entity.
Returns the underlying backend connection (a datalevin.core or datascript.core conn), for backend-specific operations dat.api doesn't wrap, e.g. datalevin.core/listen! or datalevin.core/entity.
(register-fn! db ident f)Registers a transaction function f under ident, so that tx-data
entries of the form [ident & args] invoke it as a transaction function.
For :dat.db/datalevin, f must be built with datalevin.interpret/inter-fn
at the call site (it needs to see the literal fn form to make it
serializable), and its args are [db & args].
Registers a transaction function `f` under `ident`, so that tx-data entries of the form `[ident & args]` invoke it as a transaction function. For :dat.db/datalevin, `f` must be built with `datalevin.interpret/inter-fn` at the call site (it needs to see the literal `fn` form to make it serializable), and its args are `[db & args]`.
(with-transaction [tx-db db] & body)Runs body as a single atomic transaction. tx-db is a db to be used
in place of db for transact!, q and pull within body.
If body throws, all its writes are rolled back.
Runs `body` as a single atomic transaction. `tx-db` is a db to be used in place of `db` for `transact!`, `q` and `pull` within `body`. If `body` throws, all its writes are rolled back.
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 |