MarkLogic 10 Product Documentation
op:prepareop:prepare(
$plan as map:map,
$optimize as xs:unsignedShort
) as map:map
Summary
This method prepares the specified plan for execution as an optional final step before execution.
Parameters |
$plan |
The Optic Plan. You can either use the XQuery
=> chaining operator or specify the variable that captures the
return value from the previous operation.
|
$optimize |
The optimization level, which can be 0, 1, or 2 (with 1 as the default).
|
Example
import module namespace op="http://marklogic.com/optic"
at "/MarkLogic/optic.xqy";
let $employees := op:from-view("main", "employees")
return $employees
=> op:select(())
=> op:prepare(2)
=> op:result()
Copyright © 2024 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.