MarkLogic 9 Product Documentation
dls.retentionRuleRemove

dls.retentionRuleRemove(
   names as String[]
) as null

Summary

This function removes the specified retention rules from the database.

Parameters
names The names of the retention rules to be removed.

Required Privileges

The dls-admin role is required to run this function, or the privilege:
http://marklogic.com/xdmp/privileges/dls-admin

Example

// Removes the retention rules, 'Rule1' and 'Rule2'.

const dls = require('/MarkLogic/dls');

declareUpdate();
dls.retentionRuleRemove(['Rule1', 'Rule2']);  
   

Example

// Removes all of the retention rules

const dls = require('/MarkLogic/dls');

  const names = [];
  for (let rule of dls.retentionRules('*')) {
    names.push(fn.data(fn.head(rule.xpath('//dls:name'))));
  }  
   
Powered by MarkLogic Server | Terms of Use | Privacy Policy