xdmp.transactionRollback

xdmp.transactionRollback(
   host-id as (Number|String),
   txn-id as (Number|String)
) as null

Summary

Explicitly roll back a transaction running on a named host.

Parameters
host-id A host id.
txn-id The transaction ID.

Required Privileges

http://marklogic.com/xdmp/privileges/xdmp-transaction-complete

Usage Notes

Use this function to explicitly roll back a remote transaction running in "update" or "query" transaction mode. See xdmp.rollback for more information.

Any statement executing under the remote transaction is halted immediately.

If the named host or transaction does not exist, an error is raised.

See Also

Example

xdmp.transactionRollback(xdmp.host("some-host.yourdomain.com"), some-txn-id);

=> Empty. The given transaction is rolled back and all
   modifications made by the transaction are discarded.
Powered by MarkLogic Server | Terms of Use | Privacy Policy