Loading TOC...

ModifyPlan.prototype.notExistsJoin

ModifyPlan.prototype.notExistsJoin(
   rightPlan as String,
   [ondef as String],
   [condition as xs.boolean]
) as ModifyPlan

Summary

This method is a filtering join that filters based on whether the join exists or not but doesn't add any columns.

It filters the left row set to the rows that don't have a join in the right row set.

Parameters
rightPlan The row set from the right view.
ondef The equijoin from one or more calls to the op.on function.
condition A boolean expression that filters the join output rows. See Boolean Expression Functions for the list of functions used to build boolean expressions.

Usage Notes

notExistsJoin is a method of the following classes:

The library functions for building the notExistsJoin parameters are as follows:

Example

// It filters out {'r1':2, 'k1':'b'} in p1 as value 'b' doesn't exist in column 'k2' of p2
const op = require('/MarkLogic/optic');

const p1 = op.fromLiterals([
    {'r1':1, 'k1':'a'},
    {'r1':2, 'k1':'b'}
  ]);
const p2 = op.fromLiterals([
    {'r2':3, 'k2':'a'},
    {'r2':4, 'k2':'c'}
  ]);
p1.notExistsJoin(p2, op.on('k1', 'k2')).result();
  

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