class Axiom::Optimizer::Algebra::Restriction::SetOperand
Optimize when the operand is a Set
Public Instance Methods
optimizable?()
click to toggle source
Test if the operand is a Restriction
@return [Boolean]
@api private
# File lib/axiom/optimizer/algebra/restriction.rb, line 292 def optimizable? operand.kind_of?(Axiom::Relation::Operation::Set) end
optimize()
click to toggle source
Wrap each operand in the Set in a Restriction
@return [Set]
@api private
# File lib/axiom/optimizer/algebra/restriction.rb, line 301 def optimize operand.class.new(wrap_left, wrap_right) end
Private Instance Methods
wrap_left()
click to toggle source
Utility method to wrap the left operand in a Restriction
@return [Restriction]
@api private
# File lib/axiom/optimizer/algebra/restriction.rb, line 312 def wrap_left wrap_operand(operand.left) end
wrap_right()
click to toggle source
Utility method to wrap the right operand in a Restriction
@return [Restriction]
@api private
# File lib/axiom/optimizer/algebra/restriction.rb, line 321 def wrap_right wrap_operand(operand.right) end