Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Trigger definition
xquery version "1.0-ml";
import module namespace trgr="http://marklogic.com/xdmp/triggers"
at "/MarkLogic/triggers.xqy";
trgr:create-trigger("minitrigger", "Mini trigger example",
trgr:trigger-data-event(
trgr:directory-scope("/mini/", "1"),
trgr:document-content("create"),
trgr:post-commit()),
trgr:trigger-module(xdmp:database("minimodule"), "/", "/action/trg-mini-create-action.xqy"), fn:true(), xdmp:default-permissions() )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment