Loading TOC...

MarkLogic 12 EA 2 Product Documentation
temporal:collection-set-options

temporal:collection-set-options(
   $temporal-collection as xs:string,
   $options as xs:string*
) as empty-sequence()

Summary

This function sets the options on the temporal collection.

Parameters
temporal-collection The name of the temporal collection.
options Options to control access to the temporal collection:
updates-admin-override
Specifies that users with the admin role can change or delete temporal documents using non-temporal functions, such as xdmp:document-insert and xdmp:document-delete.
archive-default-dir=dir
When archive-default-dir is specified to be a non-empty value and when you specify to protect a document with a relative archive path, the archive file path is the concatenation of this value, / and the relative path.
document-protect-priv=priv_URI
Specifies the privilege required to call the temporal:document-protect function. By default, temporal:document-protect requires the http://marklogic.com/xdmp/privileges/temporal-document-protect privilege. An empty value means that no user except admin is allowed to call temporal:document-protect .
document-wipe-priv=priv_URI
Specifies the privilege required to call the temporal:document-wipe function. By default, temporal:document-wipe requires the http://marklogic.com/xdmp/privileges/temporal-document-protect privilege. An empty value means that no user except admin is allowed to call temporal:document-wipe .
override-priv=priv_URI
Specifies the privilege required to perform admin-override operations. By default, only users with the admin role are allowed for these operations and only when updates-admin-override option is specified.

Example

xquery version "1.0-ml"; 
 
import module namespace temporal = "http://marklogic.com/xdmp/temporal" 
      at "/MarkLogic/temporal.xqy";

temporal:collection-set-options("kool", ("updates-admin-override")) 
 
(: Sets the "updates-admin-override" option on the "kool" collection. :)

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