(commit g)
Commit all changes to the graph.
Commit all changes to the graph.
(new-transaction g)
Creates a new transaction based on the given graph object.
Creates a new transaction based on the given graph object.
(rollback g)
Stops the current transaction and rolls back any changes made.
Stops the current transaction and rolls back any changes made.
(with-transaction binding & body)
Evaluates body in the context of a transaction on the specified graph, which must support transactions. The binding provides the graph for the transaction and the name to which the transactional graph is bound for evaluation of the body.
(with-transaction [tx graph] (vertex/create! tx) ...)
If the graph supports threaded transactions, the binding may also specify that the body be executed in a threaded transaction.
(with-transaction [tx graph :threaded? true] (vertex/create! tx) ...)
Note that commit
and rollback
should not be called explicitly inside
with-transaction
. If you want to force a rollback, you must throw an
exception or specify rollback in the with-transaction
call:
(with-transaction [tx graph :rollback? true] (vertex/create! tx) ...)
Evaluates body in the context of a transaction on the specified graph, which must support transactions. The binding provides the graph for the transaction and the name to which the transactional graph is bound for evaluation of the body. (with-transaction [tx graph] (vertex/create! tx) ...) If the graph supports threaded transactions, the binding may also specify that the body be executed in a threaded transaction. (with-transaction [tx graph :threaded? true] (vertex/create! tx) ...) Note that `commit` and `rollback` should not be called explicitly inside `with-transaction`. If you want to force a rollback, you must throw an exception or specify rollback in the `with-transaction` call: (with-transaction [tx graph :rollback? true] (vertex/create! tx) ...)
(with-transaction-retry* graph
f
&
{:keys [max-attempts wait-time threaded? rollback?]})
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close