Module: Axiom::Relation::Operation::Combination

Includes:
Binary
Included in:
Algebra::Join, Algebra::Product
Defined in:
lib/axiom/relation/operation/combination.rb

Overview

A mixin for relations that combine their operands

Instance Attribute Summary

Attributes included from Operation::Binary

#left, #right

Class Method Summary collapse

Methods included from Binary

#initialize

Methods included from Operation::Binary

#initialize

Class Method Details

.combine_tuples(header, left_tuple, right_tuples) {|tuple| ... } ⇒ undefined

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Combine tuples together and yield the joined tuple

Parameters:

  • header (Header)

    the header to use for the resulting tuples

  • left_tuple (Tuple)

    the left tuple to join with

  • right_tuples (Enumerable<Tuple>)

    the tuples to join to the left tuple

Yields:

  • (tuple)

Yield Parameters:

  • tuple (Tuple)

    each joined tuple

Returns:

  • (undefined)


28
29
30
31
32
# 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