all files / lib/waterline/query/integrator/ innerJoin.js

100% Statements 4/4
100% Branches 0/0
100% Functions 1/1
100% Lines 4/4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27                                          66× 66×    
/**
 * Module dependencies
 */
var join = require('./_join');
 
 
/**
 * Inner join
 *
 * Return a result set with data from child and parent
 * merged on childKey===parentKey, where t.e. exactly one
 * entry for each match.
 *
 * @option {Array} parent    [rows from the "lefthand table"]
 * @option {Array} child   [rows from the "righthand table"]
 * @option {String} parentKey     [primary key of the "lefthand table"]
 * @option {String} childKey     [foreign key from the "righthand table" to the "lefthand table"]
 * @return {Array}          [a new array of joined row data]
 *
 * @throws {Error} on invalid input
 * @synchronous
 */
module.exports = function leftOuterJoin(options) {
  options.outer = false;
  return join(options);
};