Loading TOC...

MarkLogic Server 11.0 Product Documentation
op.multiply

op.multiply(
   numericExpression as Item,
   numericExpression as String
) as numericExpression

Summary

This function multiplies the left numericExpression by the right numericExpression and returns the value.

As a convenience, the function allows passing any number of expression arguments in the form: op.multiply(expr1, expr2, ..., exprN)

Parameters
numericExpression The left numeric expression.
numericExpression The right numeric expression.

Usage Notes

The left and right expressions may be numeric literals or column identifiers.

Example

const op = require('/MarkLogic/optic');
const employees = op.fromView('main', 'employees');

employees.select(["FirstName", "LastName", "Position", "EmployeeID",
                   op.as("multiplied", op.multiply(op.col("EmployeeID"), 2))])
.result();
  

Example

const op = require('/MarkLogic/optic');
const employees = op.fromView('main', 'employees');

employees.select(["FirstName", "LastName", "Position", "EmployeeID",
                   op.as("multiplied", op.multiply(op.col("EmployeeID"), 2, 2))])
.result();
  

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