module Axiom::Relation::Operation::Combination

A mixin for relations that combine their operands

Public Class Methods

combine_tuples(header, left_tuple, right_tuples) { |join| ... } click to toggle source

Combine tuples together and yield the joined tuple

@param [Header] header

the header to use for the resulting tuples

@param [Tuple] left_tuple

the left tuple to join with

@param [Enumerable<Tuple>] right_tuples

the tuples to join to the left tuple

@yield [tuple]

@yieldparam [Tuple] tuple

each joined tuple

@return [undefined]

@api private

# File lib/axiom/relation/operation/combination.rb, line 28
def self.combine_tuples(header, left_tuple, right_tuples)
  right_tuples.each do |right_tuple|
    yield left_tuple.join(header, right_tuple)
  end
end