Loading TOC...

MarkLogic 12 EA 1 Product Documentation
xdmp:transaction-rollback

xdmp:transaction-rollback(
   $host-id as xs:unsignedLong,
   $txn-id as xs:unsignedLong
) as empty-sequence()

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:transaction-rollback(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.

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.