xdmp:get-transaction-mode() as xs:string
Retrieve the transaction mode for the current session. Returns one of "auto", "query", "update", "update-auto-commit", "query-single-statement", or "multi-auto".
declare option xdmp:transaction-mode "update"; xdmp:get-transaction-mode() => "update"
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: Get the most useful answers to questions from the MarkLogic community, or ask your own question.