Loading TOC...

MarkLogic Server 11.0 Product Documentation
trgr:trigger-enable

trgr:trigger-enable(
   $trigger-name as xs:string
) as empty-sequence()

Summary

Enables the named trigger.

Parameters
trigger-name The trigger name.

Usage Notes

This function must be run in the context of the database containing the trigger to be enabled. If no 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";

(: Run in the context of the database containing the trigger :)
trgr:trigger-enable("the_trigger_name")
  

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