public static interface PlanBuilder.ModifyPlan extends PlanBuilder.PreparePlan, PlanBuilderBase.ModifyPlanBase
Provides functions and operations in the modify phase of the plan for executing a row pipeline on the server.
| Modifier and Type | Method and Description |
|---|---|
PlanBuilder.ModifyPlan |
except(PlanBuilder.ModifyPlan right)
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.
|
PlanBuilder.ModifyPlan |
groupBy(PlanExprColSeq keys)
This method collapses a group of rows into a single row.
|
PlanBuilder.ModifyPlan |
groupBy(PlanExprColSeq keys,
PlanAggregateColSeq aggregates)
This method collapses a group of rows into a single row.
|
PlanBuilder.ModifyPlan |
intersect(PlanBuilder.ModifyPlan right)
This method restricts the left row set to rows where a row with the same columns and values exists in the right row set.
|
PlanBuilder.ModifyPlan |
joinCrossProduct(PlanBuilder.ModifyPlan right)
This method yields one output row set that concatenates every left row with every right row.
|
PlanBuilder.ModifyPlan |
joinCrossProduct(PlanBuilder.ModifyPlan right,
boolean condition)
This method yields one output row set that concatenates every left row with every right row.
|
PlanBuilder.ModifyPlan |
joinCrossProduct(PlanBuilder.ModifyPlan right,
XsBooleanExpr condition)
This method yields one output row set that concatenates every left row with every right row.
|
PlanBuilder.ModifyPlan |
joinDoc(PlanColumn docCol,
PlanColumn sourceCol)
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).
|
PlanBuilder.ModifyPlan |
joinDoc(String docCol,
String sourceCol)
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).
|
PlanBuilder.ModifyPlan |
joinDocUri(PlanColumn uriCol,
PlanColumn fragmentIdCol)
This method adds a uri column to rows based on an existing fragment id column to identify the source document for each row.
|
PlanBuilder.ModifyPlan |
joinDocUri(String uriCol,
String fragmentIdCol)
This method adds a uri column to rows based on an existing fragment id column to identify the source document for each row.
|
PlanBuilder.ModifyPlan |
joinInner(PlanBuilder.ModifyPlan right,
PlanJoinKey... keys)
This method returns all rows from multiple tables where the join condition is met.
|
PlanBuilder.ModifyPlan |
joinInner(PlanBuilder.ModifyPlan right,
PlanJoinKeySeq keys)
This method returns all rows from multiple tables where the join condition is met.
|
PlanBuilder.ModifyPlan |
joinInner(PlanBuilder.ModifyPlan right,
PlanJoinKeySeq keys,
boolean condition)
This method returns all rows from multiple tables where the join condition is met.
|
PlanBuilder.ModifyPlan |
joinInner(PlanBuilder.ModifyPlan right,
PlanJoinKeySeq keys,
XsBooleanExpr condition)
This method returns all rows from multiple tables where the join condition is met.
|
PlanBuilder.ModifyPlan |
joinLeftOuter(PlanBuilder.ModifyPlan right,
PlanJoinKey... keys)
This method yields one output row set with the rows from an inner join as well as rows from the left row set.
|
PlanBuilder.ModifyPlan |
joinLeftOuter(PlanBuilder.ModifyPlan right,
PlanJoinKeySeq keys)
This method yields one output row set with the rows from an inner join as well as rows from the left row set.
|
PlanBuilder.ModifyPlan |
joinLeftOuter(PlanBuilder.ModifyPlan right,
PlanJoinKeySeq keys,
boolean condition)
This method yields one output row set with the rows from an inner join as well as rows from the left row set.
|
PlanBuilder.ModifyPlan |
joinLeftOuter(PlanBuilder.ModifyPlan right,
PlanJoinKeySeq keys,
XsBooleanExpr condition)
This method yields one output row set with the rows from an inner join as well as rows from the left row set.
|
PlanBuilder.ModifyPlan |
orderBy(PlanSortKeySeq keys)
This method sorts the row set by the specified order definition.
|
PlanBuilder.PreparePlan |
prepare(int optimize)
This method prepares the specified plan for execution as an optional final step before execution.
|
PlanBuilder.PreparePlan |
prepare(XsIntVal optimize)
This method prepares the specified plan for execution as an optional final step before execution.
|
PlanBuilder.ModifyPlan |
select(PlanExprCol... columns)
This call projects the specified columns from the current row set and / or applies a qualifier to the columns in the row set.
|
PlanBuilder.ModifyPlan |
select(PlanExprColSeq columns)
This call projects the specified columns from the current row set and / or applies a qualifier to the columns in the row set.
|
PlanBuilder.ModifyPlan |
select(PlanExprColSeq columns,
String qualifierName)
This call projects the specified columns from the current row set and / or applies a qualifier to the columns in the row set.
|
PlanBuilder.ModifyPlan |
select(PlanExprColSeq columns,
XsStringVal qualifierName)
This call projects the specified columns from the current row set and / or applies a qualifier to the columns in the row set.
|
PlanBuilder.ModifyPlan |
union(PlanBuilder.ModifyPlan right)
This method yields all of the rows from the input row sets.
|
PlanBuilder.ModifyPlan |
whereDistinct()
This method removes duplicate rows from the row set.
|
map, reduce, reduce, reducebindParambindParam, bindParam, bindParam, bindParam, bindParam, bindParam, bindParam, bindParamexport, exportAslimit, limit, limit, offset, offset, offset, offsetLimit, offsetLimit, where, where, wherePlanBuilder.ModifyPlan except(PlanBuilder.ModifyPlan right)
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.
right - The row set from the left view.PlanBuilder.ModifyPlan groupBy(PlanExprColSeq keys)
This method collapses a group of rows into a single row.
If you want the results to include a column, specify the column either as a grouping key or as one of the aggregates. A group-by operation without a grouping key outputs a single group reflecting the entire row set.
The aggregates for a group by operation are specified as the second parameter instead of in a op:select operation (unlike SQL).
keys - 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.ModifyPlan groupBy(PlanExprColSeq keys, PlanAggregateColSeq aggregates)
This method collapses a group of rows into a single row.
If you want the results to include a column, specify the column either as a grouping key or as one of the aggregates. A group-by operation without a grouping key outputs a single group reflecting the entire row set.
The aggregates for a group by operation are specified as the second parameter instead of in a op:select operation (unlike SQL).
keys - The Optic Plan. You can either use the XQuery => chaining operator or specify the variable that captures the return value from the previous operation.aggregates - This parameter specifies the columns used to determine the groups. Rows with the same values in these columns are consolidated into a single group. The columns can be existing columns or new columns created by an expression specified with op:as. The rows produced by the group by operation include the key columns. Specify an empty sequence to create a single group for all of the rows in the row set.PlanBuilder.ModifyPlan intersect(PlanBuilder.ModifyPlan right)
This method restricts the left row set to rows where a row with the same columns and values exists in the right row set.
right - The row set from the left view.PlanBuilder.ModifyPlan joinCrossProduct(PlanBuilder.ModifyPlan right)
This method yields one output row set that concatenates every left row with every right row. Matches other than equality matches (for instance, greater-than comparisons between keys) can be implemented with a condition on the cross product.
The join performs natural joins between columns with the same identifiers. To prevent inadvertent natural joins, specify a different qualifier for the left or right columns or use different column names for the left and right columns.
right - The row set from the left view.PlanBuilder.ModifyPlan joinCrossProduct(PlanBuilder.ModifyPlan right, boolean condition)
This method yields one output row set that concatenates every left row with every right row. Matches other than equality matches (for instance, greater-than comparisons between keys) can be implemented with a condition on the cross product.
The join performs natural joins between columns with the same identifiers. To prevent inadvertent natural joins, specify a different qualifier for the left or right columns or use different column names for the left and right columns.
right - The row set from the left view.condition - The row set from the right view.PlanBuilder.ModifyPlan joinCrossProduct(PlanBuilder.ModifyPlan right, XsBooleanExpr condition)
This method yields one output row set that concatenates every left row with every right row. Matches other than equality matches (for instance, greater-than comparisons between keys) can be implemented with a condition on the cross product.
The join performs natural joins between columns with the same identifiers. To prevent inadvertent natural joins, specify a different qualifier for the left or right columns or use different column names for the left and right columns.
right - The row set from the left view.condition - The row set from the right view.PlanBuilder.ModifyPlan joinDoc(String docCol, String sourceCol)
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).
As long as the values of the column are the same as document uris, the document join will work. If the document doesn’t exist or the uri or fragment id is null in the row, the row is dropped from the rowset.
You should minimize the number of documents retrieved by filtering or limiting rows before joining documents.
docCol - The Optic Plan. You can either use the XQuery => chaining operator or specify the variable that captures the return value from the previous operation.sourceCol - The document column to add to the rows. This can be a string or column specifying the name of the new column that should have the document as its value.PlanBuilder.ModifyPlan joinDoc(PlanColumn docCol, PlanColumn sourceCol)
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).
As long as the values of the column are the same as document uris, the document join will work. If the document doesn’t exist or the uri or fragment id is null in the row, the row is dropped from the rowset.
You should minimize the number of documents retrieved by filtering or limiting rows before joining documents.
docCol - The Optic Plan. You can either use the XQuery => chaining operator or specify the variable that captures the return value from the previous operation.sourceCol - The document column to add to the rows. This can be a string or column specifying the name of the new column that should have the document as its value.PlanBuilder.ModifyPlan joinDocUri(String uriCol, String fragmentIdCol)
This method adds a uri column to rows based on an existing fragment id column to identify the source document for each row. The fragmentIdCol must be an op:fragment-id-col specifying a fragment id column. If the fragment id column is null in the row, the row is dropped from the rowset.
You should minimize the number of documents retrieved by filtering or limiting rows before joining documents.
uriCol - The Optic Plan. You can either use the XQuery => chaining operator or specify the variable that captures the return value from the previous operation.fragmentIdCol - The document uri. This is the output from op:col(‘uri’) that specifies a document uri column.PlanBuilder.ModifyPlan joinDocUri(PlanColumn uriCol, PlanColumn fragmentIdCol)
This method adds a uri column to rows based on an existing fragment id column to identify the source document for each row. The fragmentIdCol must be an op:fragment-id-col specifying a fragment id column. If the fragment id column is null in the row, the row is dropped from the rowset.
You should minimize the number of documents retrieved by filtering or limiting rows before joining documents.
uriCol - The Optic Plan. You can either use the XQuery => chaining operator or specify the variable that captures the return value from the previous operation.fragmentIdCol - The document uri. This is the output from op:col(‘uri’) that specifies a document uri column.PlanBuilder.ModifyPlan joinInner(PlanBuilder.ModifyPlan right, PlanJoinKey... keys)
This method returns all rows from multiple tables where the join condition is met. In the output row set, each row concatenates one left row and one right row for each match between the keys in the left and right row sets.
The join performs natural joins between columns with the same identifiers. To prevent inadvertent natural joins, specify a different qualifier for the left or right columns or use different column names for the left and right columns.
right - The row set from the left view.keys - The row set from the right view.PlanBuilder.ModifyPlan joinInner(PlanBuilder.ModifyPlan right, PlanJoinKeySeq keys)
This method returns all rows from multiple tables where the join condition is met. In the output row set, each row concatenates one left row and one right row for each match between the keys in the left and right row sets.
The join performs natural joins between columns with the same identifiers. To prevent inadvertent natural joins, specify a different qualifier for the left or right columns or use different column names for the left and right columns.
right - The row set from the left view.keys - The row set from the right view.PlanBuilder.ModifyPlan joinInner(PlanBuilder.ModifyPlan right, PlanJoinKeySeq keys, boolean condition)
This method returns all rows from multiple tables where the join condition is met. In the output row set, each row concatenates one left row and one right row for each match between the keys in the left and right row sets.
The join performs natural joins between columns with the same identifiers. To prevent inadvertent natural joins, specify a different qualifier for the left or right columns or use different column names for the left and right columns.
right - The row set from the left view.keys - The row set from the right view.condition - The equijoin from one or more calls to the op:on function.PlanBuilder.ModifyPlan joinInner(PlanBuilder.ModifyPlan right, PlanJoinKeySeq keys, XsBooleanExpr condition)
This method returns all rows from multiple tables where the join condition is met. In the output row set, each row concatenates one left row and one right row for each match between the keys in the left and right row sets.
The join performs natural joins between columns with the same identifiers. To prevent inadvertent natural joins, specify a different qualifier for the left or right columns or use different column names for the left and right columns.
right - The row set from the left view.keys - The row set from the right view.condition - The equijoin from one or more calls to the op:on function.PlanBuilder.ModifyPlan joinLeftOuter(PlanBuilder.ModifyPlan right, PlanJoinKey... keys)
This method yields one output row set with the rows from an inner join as well as rows from the left row set.
The join performs natural joins between columns with the same identifiers. To prevent inadvertent natural joins, specify a different qualifier for the left or right columns or use different column names for the left and right columns.
right - The row set from the left view.keys - The row set from the right view.PlanBuilder.ModifyPlan joinLeftOuter(PlanBuilder.ModifyPlan right, PlanJoinKeySeq keys)
This method yields one output row set with the rows from an inner join as well as rows from the left row set.
The join performs natural joins between columns with the same identifiers. To prevent inadvertent natural joins, specify a different qualifier for the left or right columns or use different column names for the left and right columns.
right - The row set from the left view.keys - The row set from the right view.PlanBuilder.ModifyPlan joinLeftOuter(PlanBuilder.ModifyPlan right, PlanJoinKeySeq keys, boolean condition)
This method yields one output row set with the rows from an inner join as well as rows from the left row set.
The join performs natural joins between columns with the same identifiers. To prevent inadvertent natural joins, specify a different qualifier for the left or right columns or use different column names for the left and right columns.
right - The row set from the left view.keys - The row set from the right view.condition - The equijoin from one or more calls to the op:on function.PlanBuilder.ModifyPlan joinLeftOuter(PlanBuilder.ModifyPlan right, PlanJoinKeySeq keys, XsBooleanExpr condition)
This method yields one output row set with the rows from an inner join as well as rows from the left row set.
The join performs natural joins between columns with the same identifiers. To prevent inadvertent natural joins, specify a different qualifier for the left or right columns or use different column names for the left and right columns.
right - The row set from the left view.keys - The row set from the right view.condition - The equijoin from one or more calls to the op:on function.PlanBuilder.ModifyPlan orderBy(PlanSortKeySeq keys)
This method sorts the row set by the specified order definition.
keys - 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.PreparePlan prepare(int optimize)
This method prepares the specified plan for execution as an optional final step before execution.
optimize - 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.PreparePlan prepare(XsIntVal optimize)
This method prepares the specified plan for execution as an optional final step before execution.
optimize - 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.ModifyPlan select(PlanExprCol... columns)
This call projects the specified columns from the current row set and / or applies a qualifier to the columns in the row set. Unlike SQL, a select call is not required in an Optic query.
columns - 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.ModifyPlan select(PlanExprColSeq columns)
This call projects the specified columns from the current row set and / or applies a qualifier to the columns in the row set. Unlike SQL, a select call is not required in an Optic query.
columns - 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.ModifyPlan select(PlanExprColSeq columns, String qualifierName)
This call projects the specified columns from the current row set and / or applies a qualifier to the columns in the row set. Unlike SQL, a select call is not required in an Optic query.
columns - The Optic Plan. You can either use the XQuery => chaining operator or specify the variable that captures the return value from the previous operation.qualifierName - The columns to select.PlanBuilder.ModifyPlan select(PlanExprColSeq columns, XsStringVal qualifierName)
This call projects the specified columns from the current row set and / or applies a qualifier to the columns in the row set. Unlike SQL, a select call is not required in an Optic query.
columns - The Optic Plan. You can either use the XQuery => chaining operator or specify the variable that captures the return value from the previous operation.qualifierName - The columns to select.PlanBuilder.ModifyPlan union(PlanBuilder.ModifyPlan right)
This method yields all of the rows from the input row sets. Columns that are present only in some input row sets effectively have a null value in the rows from the other row sets.
This method is often followed by the op:where-distinct modifier.
right - The row set from the left view.PlanBuilder.ModifyPlan whereDistinct()
This method removes duplicate rows from the row set.
Copyright © 2013-2017 MarkLogic Corporation.