Sha256: 28e4a01f7adb26cad520839887fe37536087f6b113d514cf0fab0d1694fdc1cc

Contents?: true

Size: 910 Bytes

Versions: 3

Compression:

Stored size: 910 Bytes

Contents

# encoding: utf-8

module Veritas
  class Optimizer
    module Relation
      module Operation

        # Abstract base class representing combinations of relations
        class Combination < Binary

          # Any relation combined with an empty relation is an empty relation
          #
          # @return [Relation::Empty]
          #
          # @api private
          def optimize
            Veritas::Relation::Empty.new(operation.header)
          end

          # Optimize when the left operand is Empty
          class EmptyLeft < self
            include Binary::EmptyLeft
          end # class EmptyLeft

          # Optimize when the right operand is Empty
          class EmptyRight < self
            include Binary::EmptyRight
          end # class EmptyRight
        end # class Combination
      end # module Operation
    end # module Relation
  end # class Optimizer
end # module Veritas

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
veritas-optimizer-0.0.5 lib/veritas/optimizer/relation/operation/combination.rb
veritas-optimizer-0.0.4 lib/veritas/optimizer/relation/operation/combination.rb
veritas-optimizer-0.0.3 lib/veritas/optimizer/relation/operation/combination.rb