Loading TOC...

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'))));
  }  
   

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