Class: Veritas::Optimizer::Function::Predicate::Exclusion::OneRightOperand

Inherits:
Veritas::Optimizer::Function::Predicate::Exclusion show all
Includes:
Veritas::Optimizer::Function::Predicate::Enumerable::OneRightOperand
Defined in:
lib/veritas/optimizer/function/predicate/exclusion.rb

Overview

Optimize when the right operand has one entry

Constant Summary

Constants inherited from Veritas::Optimizer

Noop, VERSION

Instance Attribute Summary

Attributes included from Binary

#left, #right

Attributes inherited from Veritas::Optimizer

#operation

Instance Method Summary collapse

Methods included from Veritas::Optimizer::Function::Predicate::Enumerable::OneRightOperand

#optimizable?

Methods included from Veritas::Optimizer::Function::Predicate::Enumerable

sort_by_value

Methods included from Binary

#initialize

Methods inherited from Veritas::Optimizer

chain, #initialize, #optimizable?

Instance Method Details

#optimizeInequality

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.

An Exclusion with a single right operand is equivalent to an Inequality

Returns:



26
27
28
# File 'lib/veritas/optimizer/function/predicate/exclusion.rb', line 26

def optimize
  left.ne(right.first)
end