Loading TOC...

trgr:trigger-set-name

trgr:trigger-set-name(
   $trigger-name as xs:string,
   $new-trigger-name as xs:string
) as empty-sequence()

Summary

Changes the name of a trigger.

Parameters
trigger-name The current trigger name.
new-trigger-name The new trigger name.

Usage Notes

Changes the name of a trigger from $trigger-name to $new-trigger-name.

This function must be run in the context of the database containing the trigger whose name is to be changed.

If no trigger trigger named $trigger-name exists, the exception TRGR-TRIGGERDNE is raised.

Example

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

(: In the context of the database containing the trigger :)
trgr:trigger-set-name("currentName", "newName")
  

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