Real time use case to use cts:after-query-timestamp

Viewed 16

I want to understand more about cts:after-query-timestamp and real-time use-case/scenario to use this cts function.

1 Answers

The cts:after-query-timestamp() function is used to build a query to be used as the query criteria for cts:after-query(), which is used to find documents/fragments committed after a specified timestamp.

For instance, if you want to find all of the documents that were inserted/updated within the last hour:

cts:uris("", (), 
  cts:after-query(xdmp:wallclock-to-timestamp(fn:current-dateTime() - xs:dayTimeDuration("PT1H")))
)
Related