
op:and( $left as item(), $right as item() ) as map:map
This function returns true if the specified expressions
all return true. Otherwise, it returns false.
As a convenience, you can pass a sequence of any number of expressions as the
first argument: op:and((expr1, expr2, ..., exprN))
| Parameters | |
|---|---|
| $left | The left value expression. |
| $right | The right value expression. |
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:where(op:and(op:gt(op:col("EmployeeID"), 2),
op:eq(op:col("FirstName"), 'Steve')))
=> 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:where(op:and((op:gt(op:col("EmployeeID"), 2),
op:eq(op:col("FirstName"), 'Steve'),
op:eq(op:col("LastName"), 'Martin'))))
=> op:result()
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.