
dls.retentionRuleRemove( names as String[] ) as null
This function removes the specified retention rules from the database.
| Parameters | |
|---|---|
| names | The names of the retention rules to be removed. |
dls-admin role is required to run
this function, or the privilege:http://marklogic.com/xdmp/privileges/dls-admin
// Removes the retention rules, 'Rule1' and 'Rule2'.
const dls = require('/MarkLogic/dls');
declareUpdate();
dls.retentionRuleRemove(['Rule1', 'Rule2']);
// 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: Get the most useful answers to questions from the MarkLogic community, or ask your own question.