Loading TOC...

ModifyPlan functions (ModifyPlan Object)

The following prototype methods convert a row set into a different row set (typically with fewer rows or columns). These prototype methods can be used in conjuction with the Modifier Functions

31 functions
Function name Description
ModifyPlan.prototype.bind This function adds new columns or modifies existing columns based on expressions while preserving existing unmodified columns in the row set.
ModifyPlan.prototype.bindAs This function is deprecated in favor of the bind() function and will not be supported in MarkLogic 11.
ModifyPlan.prototype.except This method restricts the left row set to rows where a row with the same columns and values doesn't exist in the right row set.
ModifyPlan.prototype.existsJoin This method is a filtering join that filters based on whether the join exists or not but doesn't add any columns.
ModifyPlan.prototype.explain This method returns a representation of the builtin execution plan.
ModifyPlan.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.
ModifyPlan.prototype.facetBy This method counts values for multiple grouping key columns.
ModifyPlan.prototype.generateView This method generates a view that encapsulates a query.
ModifyPlan.prototype.groupBy This method collapses a group of rows into a single row.
ModifyPlan.prototype.groupByUnion This method performs the union of multiple group-by operations on a row set.
ModifyPlan.prototype.groupToArrays This method performs multiple group-by operations on a row set and produces a single row with a column for each group having an array value whose items are the rows for the group.
ModifyPlan.prototype.intersect This method restricts the left row set to rows where a row with the same columns and values exists in the right row set.
ModifyPlan.prototype.joinCrossProduct This method yields one output row set that concatenates every left row with every right row.
ModifyPlan.prototype.joinDoc This function specifies a document column to add to the rows by reading the documents for an existing source column having a value of a document uri (which can be used to read other documents) or a fragment id (which can be used to read the source documents for rows).
ModifyPlan.prototype.joinDocUri This method adds a uri column to rows based on an existing fragment id column to identify the source document for each row.
ModifyPlan.prototype.joinFullOuter This method yields one output row set with the rows from an inner join as well as the other rows from both the left and right row sets.
ModifyPlan.prototype.joinInner This method returns all rows from multiple tables where the join condition is met.
ModifyPlan.prototype.joinLeftOuter This method yields one output row set with the rows from an inner join as well as the other rows from the left row set.
ModifyPlan.prototype.limit This method specifies the maximum number of rows to be returned by this Plan.
ModifyPlan.prototype.map This method applies the specified function to each row returned by the plan to produce a different result row.
ModifyPlan.prototype.notExistsJoin This method is a filtering join that filters based on whether the join exists or not but doesn't add any columns.
ModifyPlan.prototype.offset This method returns a subset of the rows in the result set.
ModifyPlan.prototype.offsetLimit This method returns a subset of the rows in the result set by skipping the number of rows specified by start and returning the remaining rows up to the length limit.
ModifyPlan.prototype.orderBy This method sorts the row set by the specified order definition.
ModifyPlan.prototype.prepare This method prepares the specified plan for execution as an optional final step before execution.
ModifyPlan.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.
ModifyPlan.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.
ModifyPlan.prototype.select This call projects the specified columns from the current row set and / or applies a qualifier to the columns in the row set.
ModifyPlan.prototype.union This method yields all of the rows from the input row sets.
ModifyPlan.prototype.where This method restricts the row set to rows matched by the boolean expression.
ModifyPlan.prototype.whereDistinct This method removes duplicate rows from the row set.