Loading TOC...

AccessPlan.prototype.intersect

AccessPlan.prototype.intersect(
   $rightPlan as String
) as Plan

Summary

This method restricts the left row set to rows where a row with the same columns and values exists in the right row set.

Parameters
$rightPlan The row set from the right view.

Usage Notes

intersect is a method of the following classes:

Example


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

const tab1 = op.fromLiterals([
	              {id:1, val:'a'},
	              {id:2, val:'b'},
	              {id:3, val:'c'}
	              ]);
const tab2 = op.fromLiterals([
	              {id:1, val:'x'},
	              {id:2, val:'b'},
	              {id:3, val:'c'}
	              ]);

tab1.intersect(tab2)
       .orderBy('id')
       .result();
  

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