Loading TOC...

alert.ruleNameQuery

alert.ruleNameQuery(
   names as String[]
) as cts.query

Summary

This function creates a query to find rules with any of the specified names. Returns a query to be passed to alert.getMyRules or alert.getAllRules.

Parameters
names A list of names for the rules to be retrieved.

Example

  var alert = require("/MarkLogic/alert.xqy");

  alert.getAllRules(
        "http://acme.com/alert/message-board", 
        alert.ruleNameQuery(["dna-alert", "rna-alert"]))

  =>Returns the rules with names "dna-alert" or "rna-alert"
  

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