Loading TOC...

PreparePlan functions (PreparePlan Object)

The following prototype methods are not operators for constructing the plan but, instead, process the plan in some way. These prototype methods can be used in conjunction with the Plan Processor Functions.

7 functions
Function name Description
PreparePlan.prototype.execute This method executes the plan.
PreparePlan.prototype.explain This method returns a representation of the builtin execution plan.
PreparePlan.prototype.export This method generates a serialized representation of the Optic query to JSON so that it can be persisted as a file or used as a REST payload.
PreparePlan.prototype.generateView This method generates a view that encapsulates a query.
PreparePlan.prototype.map This method applies the specified function to each row returned by the plan to produce a different result row.
PreparePlan.prototype.reduce This method applies a function or the builtin reducer to each row returned by the plan to produce a single result as with the reduce() method of JavaScript Array.
PreparePlan.prototype.result 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.