Loading TOC...

AccessPlan.prototype.bindAs

AccessPlan.prototype.bindAs(
   column as String,
   expression as expression
) as ModifyPlan

Summary

This function is deprecated in favor of the bind() function and will not be supported in MarkLogic 11.
This function adds a column based on an expression without altering the existing columns in the row set.

Parameters
column The name of the new column to be defined.
expression The expression that specifies the value the column in the row.

Example

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

op.fromView('main', 'expenses')
  .bindAs('ProjectedAmount', op.multiply(op.col('Amount'), 1.1))
  .result();
  

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