op:result(
$plan as map:map,
[$outType as xs:string?],
[$bindings as map:map]
) as xs:string?
Summary
This method executes the plan (mapping or reducing, if specified) to generate the result,
which is a sequence of map:map or json:array rows,
unless mapped or reduced to different output.
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.
$outType
This parameter specifies the outputType as either "object" (the default)
for a map:map sequence with keys of the column names and values of the
column values or "array" for a json:array with the list of column
names as an initial header and the column values in the same order for the subsequent rows.
$bindings
This parameter provides a map with the names and
values of placeholder parameters. An error is thrown if a placeholder
parameter is not bound.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.