xdmp.requestTimestamp() as (Number|String)?
Returns the system timestamp for this request if the request is a query statement. Returns the empty sequence if the current request is an update statement.
xdmp.requestTimestamp
function returns the system
timestamp that is in effect for current query. This timestamp will
remain unchanged for the duration of the query. If you want to get
the most recent system timestamp external to the current running
context during an update statement (for example, if your query takes
a long time to run, and there are other updates occurring in your
database while your update statement is running), you can use
xdmp.eval
to evaluate a separate query statement that
returns the system timestamp at the time the
xdmp.eval
query is evaluated.
xdmp.requestTimestamp(); => 1234567
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.