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 Composer Functions.
Function name | Description |
---|---|
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.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.groupBy | This method collapses a group of rows into a single row. |
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.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 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.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. |