Loading TOC...

ModifyPlan.prototype.joinFullOuter

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

Summary

This method yields one output row set with the rows from an inner join as well as the other rows from both the left and right row sets.

The join performs natural joins between columns with the same identifiers. To prevent inadvertent natural joins, specify a different qualifier for the left or right columns or use different column names for the left and right columns.

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

joinFullOuter is a method of the following classes:

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

Example

// Find the employees with or without locations and the locations without employees.

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

const employees = op.fromView('main', 'employees');
const locations = op.fromView('main', 'locations');
const Plan =
employees.joinFullOuter(locations, op.on(employees.col('LocationID'), locations.col('LocationID')))
   .orderBy('EmployeeID')
Plan.result();
  

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