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();
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy