Last active
April 25, 2018 06:15
-
-
Save nishantsingh1/2acf5ff84a2d63ca9574aedad2899188 to your computer and use it in GitHub Desktop.
Triggers module definition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version '1.0-ml'; | |
(: evaluate this against the database specified | |
in the trigger definition minitrigger in this example) | |
:) | |
xdmp:document-insert("/action/trg-mini-create-action.xqy", | |
text{ " | |
xquery version '1.0-ml'; | |
import module namespace trgr='http://marklogic.com/xdmp/triggers' | |
at '/MarkLogic/triggers.xqy'; | |
import module namespace mylib='minilib' at '/SAMPLE/MODULE/sample-library.xqy'; | |
declare variable $trgr:uri as xs:string external; | |
xdmp:log(fn:concat('*****Document with /mini root ', $trgr:uri, ' was created.*****', mylib:get-metadata()))" | |
}, xdmp:permission('app-user', 'execute')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment