Module: Veritas::Optimizer::Relation::Operation::Unary::OrderOperand

Overview

Optimize when the operand is an Order

Instance Method Summary collapse

Instance Method Details

#optimizable?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Test if the operand is an Order

Returns:

  • (Boolean)


37
38
39
# File 'lib/veritas/optimizer/relation/operation/unary.rb', line 37

def optimizable?
  operand.kind_of?(Veritas::Relation::Operation::Order)
end

#optimizeOrder

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Drop the Order and wrap the operand

Returns:



46
47
48
# File 'lib/veritas/optimizer/relation/operation/unary.rb', line 46

def optimize
  wrap_operand
end