Skip to main content

What's New in MarkLogic 11

xdmp:transaction-mode XQuery Prolog Option Deprecated

The XQuery prolog option xdmp:transaction-mode is deprecated as of MarkLogic 9.0-2. Use the xdmp:commit and xdmp:update prolog options instead.

Note that the new prolog options differ from xdmp:transaction-mode in that they affect only the transaction created after their declaration, whereas xdmp:transaction-mode settings persist across an entire session.

The following table illustrates the correspondence between the old and new option settings:

xdmp:transaction-mode value

Equivalent xdmp:commit and xdmp:updateOption Settings

"auto"

declare option xdmp:commit "auto";

declare option xdmp:update "auto";

"update-auto-commit"

declare option xdmp:commit "auto";

declare option xdmp:update "true";

"update"

declare option xdmp:commit "explicit";

declare option xdmp:update "true";

"query"

declare option xdmp:commit "explicit";

declare option xdmp:update "false";

Note that the default values for xdmp:commit and xdmp:update are both “auto”, so you do not need to set this value explicitly in most cases.

For more details, see xdmp:update and xdmp:commit in the XQuery and XSLT Reference Guide.