Loading TOC...

MarkLogic 12 EA 1 Product Documentation
xdmp:get-transaction-mode

xdmp:get-transaction-mode() as xs: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

declare option xdmp:transaction-mode "update";
xdmp:get-transaction-mode()

=> "update"

Example

declare option xdmp:transaction-mode "update";

xdmp:set-transaction-mode("query"),
xdmp:get-transaction-mode()

=> "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.