Loading TOC...

xdmp:eager

xdmp:eager(
   $arg as item()*
) as item()*

Summary

Returns the value of its argument, evaluated eagerly.

Parameters
arg The value to return

Example

let $eager := xdmp:eager(cts:search(fn:doc(), "hello"))
let $complex := xdmp:lazy(my:bigCalculation())
return
  if (fn:count($eager) > 10 )
  then $complex
  else ()

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.