trgr.triggerSetName( trigger-name as String, new-trigger-name as String ) as null
Changes the name of a trigger.
Parameters | |
---|---|
trigger-name | The current trigger name. |
new-trigger-name | The new trigger name. |
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.
// In the context of the database containing the trigger. declareUpdate(); const trgr = require('/MarkLogic/triggers'); trgr.triggerSetName('currentName', 'newName');