<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.transactionRollback.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.transactionRollback</api:function-name><api:suggest>xdmp.transactionrollback</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>transactionrollback</api:suggest><api:function-link mode="xquery" fullname="xdmp:transaction-rollback">/apidoc/8.0/xdmp:transaction-rollback.xml</api:function-link><api:function mode="javascript" name="transactionRollback" type="builtin" lib="xdmp" category="TransactionBuiltins" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.transactionRollback"><api:summary>
  Explicitly roll back a transaction running on a named host.
</api:summary><api:params><api:param name="host-id" type="xs:unsignedLong"><api:param-description>
    A host id.
  </api:param-description><api:param-name>host-id</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="txn-id" type="xs:unsignedLong"><api:param-description>
    The transaction ID.</api:param-description><api:param-name>txn-id</api:param-name><api:param-type>String</api:param-type></api:param></api:params><api:return>null</api:return><api:privilege>
  <p xmlns="http://www.w3.org/1999/xhtml"><code>http://marklogic.com/xdmp/privileges/xdmp-transaction-complete</code></p>
</api:privilege><api:usage>
  <p xmlns="http://www.w3.org/1999/xhtml">
     Use this function to explicitly roll back a remote transaction running in
     "update" or "query" transaction mode. See <code><a href="./xdmp:rollback">
     xdmp:rollback</a></code> for more information.
  </p>
  <p xmlns="http://www.w3.org/1999/xhtml">
     Any statement executing under the remote transaction is halted immediately.
  </p>
  <p xmlns="http://www.w3.org/1999/xhtml">
     If the named host or transaction does not exist, an error is raised.
  </p>
</api:usage><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.transactionRollback(xdmp.host("some-host.yourdomain.com"), some-txn-id);

=&gt; Empty. The given transaction is rolled back and all
   modifications made by the transaction are discarded.
</pre></api:example></api:function></api:function-page>