ModifyPlan.prototype.existsJoin( rightPlan as String, [ondef as String], [condition as xs.boolean] ) as ModifyPlan
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 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. |
existsJoin
is a method of the following classes:
The library functions for building the existsJoin parameters are as follows:
// It filters out {'r1':1, 'k1':'a'} in p1 as value 'a' exists 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.existsJoin(p2, op.on('k1', 'k2')).result();
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.