class Axiom::Optimizer::Relation::Operation::Sorted::SortedOperand

Optimize when the operand is an Sorted

Public Instance Methods

optimizable?() click to toggle source

Test if the operand is an Sorted

@return [Boolean]

@api private

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

Flatten Sorted operations using the operation directions

@return [Sorted]

@api private

# File lib/axiom/optimizer/relation/operation/sorted.rb, line 28
def optimize
  operand.operand.sort_by(operation.directions)
end