Unique identifier of this transaction.
See Database.transaction.
Attempts to abort the transaction to the databases.
Attempts to commit the transaction to the databases.
Checks whether the transaction exists.
Retrieves general information about the transaction.
Executes the given function locally as a single step of the transaction.
Type of the callback's returned promise.
Callback function returning a promise.
Warning: The callback function should wrap a single call of an async
arangojs method (e.g. a method on a {@link Collection} object of a
collection that is involved in the transaction or the db.query
method).
If the callback function is async, only the first promise-returning (or
async) method call will be executed as part of the transaction. See the
examples below for how to avoid common mistakes when using this method.
Note: Avoid defining the callback as an async function if possible as arangojs will throw an error if the callback did not return a promise. Async functions will return an empty promise by default, making it harder to notice if you forgot to return something from the callback.
Note: Although almost anything can be wrapped in a callback and passed to this method, that does not guarantee ArangoDB can actually do it in a transaction. Refer to the ArangoDB documentation if you are unsure whether a given operation can be executed as part of a transaction. Generally any modification or retrieval of data is eligible but modifications of collections or databases are not.
Generated using TypeDoc
Represents a streaming transaction in a Database.