
op:in( $value as item(), $anyOf as item()+ ) as map:map
This function returns true if a test expression evaluates
to the same value as any of a list of candidate expressions. Otherwise,
it returns false. The expressions can include calls to the
column parameter function
such as
op:col function
to get the value of a column.
| Parameters | |
|---|---|
| $value | The expression providing the value to test. It can be a number, a column function such as op:col, op:view-col, or op:schema-col, which contains numbers or an expression that outputs a number. |
| $anyOf | One or more expressions providing the candidate values. |
xquery version "1.0-ml";
import module namespace op="http://marklogic.com/optic"
at "/MarkLogic/optic.xqy";
op:from-view("main", "employees")
=> op:where(op:in(op:col("EmployeeID"), (3, 5, 8)))
=> op:select(("EmployeeID", "FirstName", "LastName"))
=> op:order-by("EmployeeID")
=> op:result()
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.