op.or

op.or(
   booleanExpression as xs.boolean
) as booleanExpression

Summary

This function returns true if either of the specified boolean expressions return true. Otherwise, it returns false.

Parameters
booleanExpression One or more boolean expressions. See Boolean Expression Functions for the list of functions used to build boolean expressions.

Example


const op = require('/MarkLogic/optic');
const employees = op.fromView('main', 'employees');
 
employees.where(op.or(op.gt(op.col('EmployeeID'), 3),  
                      op.eq(op.col('FirstName'), 'Steve')))
.result();

  
Powered by MarkLogic Server | Terms of Use | Privacy Policy