Sha256: 308e62ceef1cbf61b263fcf3740de0035678cad7d50620c11a6201d071cd029a

Contents?: true

Size: 891 Bytes

Versions: 1

Compression:

Stored size: 891 Bytes

Contents

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

1 entries across 1 versions & 1 rubygems

Version Path
veritas-0.0.2 lib/veritas/optimizer/relation/operation/combination.rb