Loading TOC...

MarkLogic 12 Product Documentation
op.isDefined

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

Summary

This function tests whether the value of an expression is null in the row where the expression might be as simple as a column identified by column parameter function , such as op.col .

Parameters
booleanExpression A boolean expression that might be null. See Boolean Expression Functions for the list of functions used to build boolean expressions.

Example

const op = require('/MarkLogic/optic');

op.fromLiterals([
	            {row:1, sparse:6},
	            {row:2},
	            {row:3, sparse:4}
	            ])
            .where(op.isDefined(op.col('sparse'))
	          .select(['row', 'sparse')
	          .result();
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.