public static interface PlanBuilder.PreparePlan extends PlanBuilder.ExportablePlan, PlanBuilderBase.PreparePlanBase
Provides functions and operations in the prepare phase of the plan for executing a row pipeline on the server.
| Modifier and Type | Method and Description |
|---|---|
PlanBuilder.ExportablePlan |
map(PlanFunction func)
This method applies the specified function to each row returned by the plan to produce a different result row.
|
PlanBuilder.ExportablePlan |
reduce(PlanFunction func)
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. |
PlanBuilder.ExportablePlan |
reduce(PlanFunction func,
String seed)
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. |
PlanBuilder.ExportablePlan |
reduce(PlanFunction func,
XsAnyAtomicTypeVal seed)
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. |
bindParambindParam, bindParam, bindParam, bindParam, bindParam, bindParam, bindParam, bindParamexport, exportAsPlanBuilder.ExportablePlan map(PlanFunction func)
This method applies the specified function to each row returned by the plan to produce a different result row.
func - The Optic Plan. You can either use the XQuery => chaining operator or specify the variable that captures the return value from the previous operation.PlanBuilder.ExportablePlan reduce(PlanFunction func)
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.
The signature of the reducer must be function(previous, row, i, state), where previous is the seed on the first request and the return from the previous call on subsequent request; row is the current row; i is the zero-based index of the row, and state is an object with an isLast property (which is true on the last iteration but can be set to true on previous iterations for early termination).
The implementation of a op:reduce function can call op:map functions to chain map calls with reduce calls.
func - The Optic Plan. You can either use the XQuery => chaining operator or specify the variable that captures the return value from the previous operation.PlanBuilder.ExportablePlan reduce(PlanFunction func, String seed)
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.
The signature of the reducer must be function(previous, row, i, state), where previous is the seed on the first request and the return from the previous call on subsequent request; row is the current row; i is the zero-based index of the row, and state is an object with an isLast property (which is true on the last iteration but can be set to true on previous iterations for early termination).
The implementation of a op:reduce function can call op:map functions to chain map calls with reduce calls.
func - The Optic Plan. You can either use the XQuery => chaining operator or specify the variable that captures the return value from the previous operation.seed - The function to be appied.PlanBuilder.ExportablePlan reduce(PlanFunction func, XsAnyAtomicTypeVal seed)
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.
The signature of the reducer must be function(previous, row, i, state), where previous is the seed on the first request and the return from the previous call on subsequent request; row is the current row; i is the zero-based index of the row, and state is an object with an isLast property (which is true on the last iteration but can be set to true on previous iterations for early termination).
The implementation of a op:reduce function can call op:map functions to chain map calls with reduce calls.
func - The Optic Plan. You can either use the XQuery => chaining operator or specify the variable that captures the return value from the previous operation.seed - The function to be appied.Copyright © 2013-2017 MarkLogic Corporation.