Loading TOC...

ModifyPlan.prototype.bind

ModifyPlan.prototype.bind(
   columns as columnIdentifier[]
) as ModifyPlan

Summary

This function adds new columns or modifies existing columns based on expressions while preserving existing unmodified columns in the row set.

Parameters
columns The op.as calls that specify the column name and the expression that constructs the column values.

Usage Notes

bind is a method of the following classes:

See Also

Example

const op = require('/MarkLogic/optic');

op.fromView('main', 'employees')
   .bind([
       op.as('FirstName', op.fn.substringBefore(op.col('FullName'), ' ')),
       op.as('LastName',  op.fn.substringAfter(op.col('FullName'),  ' '))
       ])
   .orderBy('EmployeeID')
   .result();
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.