Loading TOC...

MarkLogic 12 EA 2 Product Documentation
AccessPlan functions (AccessPlan Object)

The following prototype methods access data persisted in the row triple, triple, and lexicon indexes as well as literal row sets constructed in the program. These prototype methods can be used in conjunction with the Data Access Functions.

43 functions
Function name Description
AccessPlan.prototype.bind This function adds new columns or modifies existing columns based on expressions while preserving existing unmodified columns in the row set.
AccessPlan.prototype.bindAs This function is deprecated in favor of the bind() function and will not be supported in MarkLogic 11.
AccessPlan.prototype.col This method identifies a column, where the column name is unique.
AccessPlan.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.
AccessPlan.prototype.execute This method executes the plan.
AccessPlan.prototype.existsJoin This method is a filtering join that filters based on whether the join exists or not but doesn't add any columns.
AccessPlan.prototype.explain This method returns a representation of the builtin execution plan.
AccessPlan.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.
AccessPlan.prototype.facetBy This method counts values for multiple grouping key columns.
AccessPlan.prototype.generateView This method generates a view that encapsulates a query.
AccessPlan.prototype.groupBy This method collapses a group of rows into a single row.
AccessPlan.prototype.groupByUnion This method performs the union of multiple group-by operations on a row set.
AccessPlan.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.
AccessPlan.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.
AccessPlan.prototype.joinCrossProduct This method yields one output row set that concatenates every left row with every right row.
AccessPlan.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).
AccessPlan.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).
AccessPlan.prototype.joinDocCols This function populates the view with the uri, doc, collections, metadata, permissions, and / or quality document descriptor columns for database document values.
AccessPlan.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.
AccessPlan.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.
AccessPlan.prototype.joinInner This method returns all rows from multiple tables where the join condition is met.
AccessPlan.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.
AccessPlan.prototype.limit This method specifies the maximum number of rows to be returned by this Plan.
AccessPlan.prototype.lockForUpdate Gets an early lock on documents that will be updated later in the pipeline with an operation like remove() or write().
AccessPlan.prototype.map This method applies the specified function to each row returned by the plan to produce a different result row.
AccessPlan.prototype.notExistsJoin This method is a filtering join that filters based on whether the join exists or not but doesn't add any columns.
AccessPlan.prototype.offset This method returns a subset of the rows in the result set.
AccessPlan.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.
AccessPlan.prototype.orderBy This method sorts the row set by the specified order definition.
AccessPlan.prototype.prepare This method prepares the specified plan for execution as an optional final step before execution.
AccessPlan.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.
AccessPlan.prototype.remove This method deletes a document from the database.
AccessPlan.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.
AccessPlan.prototype.sampleBy This function samples rows from a view or from a pattern match on the triple index.
AccessPlan.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.
AccessPlan.prototype.transformDoc This function applies a transformation to a column that contains documents.
AccessPlan.prototype.union This method yields all of the rows from the input row sets.
AccessPlan.prototype.unnestInner This function flattens an array value into multiple rows.Then performs a prototype.joinInner on the rest of the rows.
AccessPlan.prototype.unnestLeftOuter This function flattens an array value into multiple rows.Then performs a prototype.joinLeftOuter on the rest of the rows.
AccessPlan.prototype.validateDoc Validate the document based on a supplied schema.
AccessPlan.prototype.where This method restricts the row set to rows matched by the boolean expression.
AccessPlan.prototype.whereDistinct This method removes duplicate rows from the row set.
AccessPlan.prototype.write Inserts or overwrites the documents identified by the uri column with the data supplied by the other document descriptor columns.