
alert:action-set-module-db( $action as element(alert:action), $module-db as xs:unsignedLong ) as element(alert:action)
This function sets the module database of a given action.
| Parameters | |
|---|---|
| $action | The representation of an action. |
| module-db | The ID of the database containing the module of the action. |
xquery version "1.0-ml";
import module namespace alert = "http://marklogic.com/xdmp/alert"
at "/MarkLogic/alert.xqy";
let $action := alert:get-actions("my-alert-config-uri", "my-action")
return
alert:action-set-module-db($action, xdmp:database("my-new-database"))