Loading TOC...


   outputType as String,
   [bindings as String],
   [traceFlags as String]
) as Plan


This method executes the plan (mapping or reducing, if specified) to generate the result, which is a plan, document plan, prepared plan, or map or reduce result plan.

Unless otherwise mapped or reduced, each row is returned as a sem.binding object with a property for each column that exists in the row.

outputType This parameter specifies the outputType as either "object" (the default) for a JavaScript object with keys of the column names and values of the column values or "array" for a JavaScript array.
bindings This parameter provides a JavaScript literal object with the names and values of placeholder parameters. An error is thrown if a placeholder parameter is not bound.
traceFlags This parameter specifies whether the trace flags (typically, those for the builtins) are enabled while getting results.

Usage Notes

result is a method of the following classes:

See Also


const op = require('/MarkLogic/optic');
op.fromView('main', 'employees')orderdef
   .select(['EmployeeID', 'FirstName', 'LastName'])

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