Loading TOC...

xdmp:commit

xdmp:commit() as empty-sequence()

Summary

Commit the current transaction to the database.

Usage Notes

Transactions running in "update" or "query" transaction mode must be explicitly committed, using this function. xdmp:commit is a no-op in "auto" transaction mode (the default) because auto-commit transactions automatically commit at the end of every statement.

When you call xdmp:commit, the transaction is marked for commit, but commit does not actually happen until the end of the currently executing statement.

This function is equivalent to calling xdmp:transaction-commit for the current host and transaction: xdmp:transaction-commit(xdmp:host(), xdmp:transaction()).

See Also

Example

  xdmp:set-transaction-mode("update"),
  xdmp:document-insert("/docs/mydoc.xml", <myData/>),
  xdmp:commit()

  => Empty. The current transaction is marked ready to be committed.
     When the commit completes, the document is visible in the database,
     and the transaction ends.

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy