<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.getTransactionMode.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.getTransactionMode</api:function-name><api:suggest>xdmp.gettransactionmode</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>gettransactionmode</api:suggest><api:function-link mode="xquery" fullname="xdmp:get-transaction-mode">/apidoc/8.0/xdmp:get-transaction-mode.xml</api:function-link><api:function mode="javascript" name="getTransactionMode" type="builtin" lib="xdmp" category="TransactionBuiltins" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.getTransactionMode"><api:summary>
  Retrieve the transaction mode for the current session. Returns one of
  "auto", "update", "update-auto-commit", or "query".
</api:summary><api:params/><api:return>String</api:return><api:usage>
  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.
</api:usage><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
declareUpdate();
xdmp.getTransactionMode();

=&gt; "update-auto-commit"
</pre></api:example><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
declareUpdate();
xdmp.setTransactionMode("query");
xdmp.getTransactionMode();

=&gt; "query". Changing the transaction mode during
   execution does not affect the current transaction,
   but still changes the transaction mode of the
   current session.
</pre></api:example></api:function></api:function-page>