Loading TOC...

MarkLogic 9 Product Documentation
xdmp.getTransactionMode

xdmp.getTransactionMode() as String

Summary

Retrieve the transaction mode for the current session. Returns one of "auto", "query", "update", "update-auto-commit", "query-single-statement", or "multi-auto".

Usage Notes

The transaction mode for the session may not be the same as the transaction mode for the current transaction. The mode of a transaction is fixed when the transaction is created.

See Also

Example

declareUpdate();
xdmp.getTransactionMode();

=> "update-auto-commit"

Example

declareUpdate();
xdmp.setTransactionMode("query");
xdmp.getTransactionMode();

=> "query". Changing the transaction mode during
   execution does not affect the current transaction,
   but still changes the transaction mode of the
   current session.

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.