class Axiom::Optimizer::Relation::Operation::Limit::EqualLimitOperand

Optimize when the operand is a Limit and the limits are equal

Public Instance Methods

optimizable?() click to toggle source

Test if the operand is a Limit and the limits are equal

@return [Boolean]

@api private

# File lib/axiom/optimizer/relation/operation/limit.rb, line 53
def optimizable?
  operand.kind_of?(operation.class) && equal_limit?
end
optimize() click to toggle source

Flatten equal Limit relations into a single relation

@return [Projection]

@api private

# File lib/axiom/optimizer/relation/operation/limit.rb, line 62
def optimize
  operand
end

Private Instance Methods

equal_limit?() click to toggle source

Test if the operation and operand limits are equal

@return [Boolean]

@api private

# File lib/axiom/optimizer/relation/operation/limit.rb, line 73
def equal_limit?
  limit == operand.limit
end