op:multiply( $left as item(), $right as item() ) as map:map
This function multiplies the left numericExpression
by the right
numericExpression
and returns the value.
As a convenience, the function allows passing a sequence of expression arguments in the form:
op:multiply((expr1, expr2, ..., exprN))
Parameters | |
---|---|
$left | The left numeric expression. It can be a number, a column function such as op:col, op:view-col, or op:schema-col, or expressions. |
$right | The right numeric expression. It can be a number, a column function such as op:col, op:view-col, or op:schema-col, or expressions. |
xquery version "1.0-ml"; import module namespace op="http://marklogic.com/optic" at "/MarkLogic/optic.xqy"; let $employees := op:from-view("main", "employees") return $employees => op:select(("FirstName", "LastName", "Position", "EmployeeID", op:as("multipled", op:multiply(op:col("EmployeeID"), 2)))) => op:result();
xquery version "1.0-ml"; import module namespace op="http://marklogic.com/optic" at "/MarkLogic/optic.xqy"; let $employees := op:from-view("main", "employees") return $employees => op:select(("FirstName", "LastName", "Position", "EmployeeID", op:as("multipled", op:multiply((op:col("EmployeeID"), 2, 2))))) => op:result();
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.