op.multiply( numericExpression as Item, numericExpression as item(),... ) as numericExpression
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. It can be a number, a column function such as op.col, op.viewCol, or op.schemaCol, or expressions. |
numericExpression | The right numeric expression. It can be a number, a column function such as op.col, op.viewCol, or op.schemaCol, or expressions. |
The left and right expressions may be numeric literals or column identifiers.
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();
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: Get the most useful answers to questions from the MarkLogic community, or ask your own question.