Loading TOC...

MarkLogic 12 EA 2 Product Documentation
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 conjunction with the Modifier Functions

42 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.execute This method executes the plan.
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.joinDocAndUri This method adds an uri column and a document column to rows based on 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.joinDocCols This function populates the view with the uri, doc, collections, metadata, permissions, and / or quality document descriptor columns for database document values.
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.lockForUpdate Gets an early lock on documents that will be updated later in the pipeline with an operation like remove() or write().
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.onError Add an error-handler to the Optic Pipeline to catch Optic Update runtime errors.
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.remove This method deletes a document from the database.
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.transformDoc This function applies a transformation to a column that contains documents.
ModifyPlan.prototype.union This method yields all of the rows from the input row sets.
ModifyPlan.prototype.unnestInner This function flattens an array value into multiple rows.Then performs a prototype.joinInner on the rest of the rows.
ModifyPlan.prototype.unnestLeftOuter This function flattens an array value into multiple rows.Then performs a prototype.joinLeftOuter on the rest of the rows.
ModifyPlan.prototype.validateDoc Validate the document based on a supplied schema.
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.
ModifyPlan.prototype.write Inserts or overwrites the documents identified by the uri column with the data supplied by the other document descriptor columns.