Sha256: 5c0c46808b3831571c02d7e8aba2bc86a78eff63753884aceb4b6bf477f11049

Contents?: true

Size: 904 Bytes

Versions: 2

Compression:

Stored size: 904 Bytes

Contents

# encoding: utf-8

module Axiom
  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
            Axiom::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 Axiom

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
axiom-optimizer-0.2.0 lib/axiom/optimizer/relation/operation/combination.rb
axiom-optimizer-0.1.1 lib/axiom/optimizer/relation/operation/combination.rb