/** * Filters the results of the first dataset based on the condition using the second dataset. * * @param {Array} first - The first dataset to filter. * @param {Array} second - The second dataset to filter by. * @param {Function} condition - The condition to filter the first dataset by. * @returns {Array} - The filtered dataset. */ export function antiJoin(first: Array, second: Array, condition: Function): Array; /** * Joins two datasets together based on a condition. Result includes all rows from the first * dataset and matching rows from the second dataset. In case of multiple matches, all * combinations are returned. When combining the rows, the columns from the first dataset take * precedence. * * @param {Array} first - The first dataset to join. * @param {Array} second - The second dataset to join. * @param {Function} condition - The condition to join the datasets on. * @returns {Array} - The joined dataset. */ export function innerJoin(first: Array, second: Array, condition: Function): Array; /** * Performs a left join on two datasets based on a condition. * * - Result includes all rows from the first dataset and matching rows from the second dataset. * - In case of multiple matches, all combinations are returned. * - When combining the rows, the columns from the first dataset take precedence. * - If there is no match in the second dataset, only the row from the first dataset is returned. * * This can be used to perform a right join by swapping the datasets. * * @param {Array} first - The first dataset to join. * @param {Array} second - The second dataset to join. * @param {Function} condition - The condition to join the datasets on. * @returns {Array} - The joined dataset. */ export function leftJoin(first: Array, second: Array, condition: Function): Array; /** * Performs a right join on two datasets based on a condition. * * - Result includes all rows from both datasets. * - In case of multiple matches, all combinations are returned. * - When combining the rows, the columns from the second dataset take precedence. * - If there is no match in the first dataset, only the row from the second dataset is returned. * * @param {Array} first - The first dataset to join. * @param {Array} second - The second dataset to join. * @param {Function} condition - The condition to join the datasets on. * @returns {Array} - The joined dataset. */ export function rightJoin(first: Array, second: Array, condition: Function): Array; /** * Performs a full join on two datasets based on a condition. * * - Result includes all rows from both datasets. * - In case of multiple matches, all combinations are returned. * - When combining the rows, the columns from the second dataset take precedence. * - If there is no match in the first dataset, only the row from the second dataset is returned. * * @param {Array} first - The first dataset to join. * @param {Array} second - The second dataset to join. * @param {Function} condition - The condition to join the datasets on. * @returns {Array} - The joined dataset. */ export function fullJoin(first: Array, second: Array, condition: Function): Array; /** * Performs a cross join on two datasets. Result includes all combinations of rows from both datasets. * * @param {Array} first - The first dataset to join. * @param {Array} second - The second dataset to join. * @returns {Array} - The joined dataset. */ export function crossJoin(first: Array, second: Array): Array; /** * Performs a semi join on two datasets based on a condition. Result includes all rows from the first * dataset that have a match in the second dataset. * * @param {Array} first - The first dataset to join. * @param {Array} second - The second dataset to join. * @param {Function} condition - The condition to join the datasets on. * @returns {Array} - The joined dataset. */ export function semiJoin(first: Array, second: Array, condition: Function): Array; /** * Performs a nested join on two datasets based on a condition. Result includes all rows from the first * dataset that have a match in the second dataset. The result is nested with the matching rows from the * second dataset. * * @param {Array} first - The first dataset to join. * @param {Array} second - The second dataset to join. * @param {Function} condition - The condition to join the datasets on. * @param {String} [key='children'] - The key to nest the matching rows under. * @returns {Array} - The joined dataset. */ export function nestedJoin(first: Array, second: Array, condition: Function, key?: string): Array;