temporal.statementSetSystemTime( system-time as Date ) as null
This function sets the system start time on temporal documents that are inserted or deleted in the same statement as this function. If this function is not called along with a temporal document insert or delete, nothing will be affected.
Parameters | |
---|---|
system-time | The dateTime to set. |
http://marklogic.com/xdmp/privileges/temporal-statement-set-system-time
declareUpdate(); var temporal = require("/MarkLogic/temporal.xqy"); var root = {"tempdoc": {"content": "content here"} }; var options = {metadata: {validStart: "1601-01-01T13:59:00Z", validEnd: "9999-12-31T11:59:59Z"} }; temporal.documentInsert("kool", "doc.json", root, options); temporal.statementSetSystemTime(xs.dateTime("1601-01-01T14:00:00Z"));