class Axiom::Optimizer::Algebra::Restriction::RestrictionOperand

Optimize when the operand is a Restriction

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 115
def optimizable?
  operand.kind_of?(operation.class)
end
optimize() click to toggle source

Flatten nested Restrictions into a single Restriction

@return [Restriction]

@api private

# File lib/axiom/optimizer/algebra/restriction.rb, line 124
def optimize
  wrap_operand
end

Private Instance Methods

predicate() click to toggle source

Join the operand and operation predicates and optimize them

@return [Function]

@api private

Calls superclass method
# File lib/axiom/optimizer/algebra/restriction.rb, line 135
def predicate
  operand.predicate.and(super).optimize
end