
op.and( booleanExpression as xs.boolean ) as booleanExpression
This function returns true if the specified boolean expressions
all return true. Otherwise, it returns false.
As a convenience, the function allows passing any number of expression arguments in the form:
op.and(expr1, expr2, ..., exprN)
| Parameters | |
|---|---|
| booleanExpression | Two or more boolean expressions. See Boolean Expression Functions for the list of functions used to build boolean expressions. |
const op = require('/MarkLogic/optic');
const employees = op.fromView('main', 'employees');
employees.where(op.and(op.eq(op.col('EmployeeID'), 3),
op.eq(op.col('FirstName'), 'Steve')))
.result();
const op = require('/MarkLogic/optic');
const employees = op.fromView('main', 'employees');
employees.where(op.and(op.eq(op.col('EmployeeID'), 3),
op.eq(op.col('FirstName'), 'Steve'),
op.eq(op.col('LastName'), 'Martin')))
.result();
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.