Loading TOC...

trgr.triggerSetName

trgr.triggerSetName(
   $trigger-name as String,
   $new-trigger-name as String
) as null

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

// In the context of the database containing the trigger.

declareUpdate();
const trgr = require('/MarkLogic/triggers');

trgr.triggerSetName('currentName', 'newName');
   

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