xdmp.getTransactionMode() as String
Retrieve the transaction mode for the current session. Returns one of "auto", "query", "update", "update-auto-commit", "query-single-statement", or "multi-auto".
declareUpdate(); xdmp.getTransactionMode(); => "update-auto-commit"
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.