
op.isDefined( booleanExpression as xs.boolean ) as booleanExpression
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. |
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();