Class: Veritas::Optimizer::Relation::Operation::Limit::ZeroLimit
- Inherits:
-
Veritas::Optimizer::Relation::Operation::Limit
- Object
- Veritas::Optimizer
- Unary
- Veritas::Optimizer::Relation::Operation::Limit
- Veritas::Optimizer::Relation::Operation::Limit::ZeroLimit
- Defined in:
- lib/veritas/optimizer/relation/operation/limit.rb
Overview
Optimize when the limit is zero
Constant Summary
Constants inherited from Veritas::Optimizer
Instance Attribute Summary
Attributes inherited from Unary
Attributes included from Function::Unary
Attributes inherited from Veritas::Optimizer
Instance Method Summary collapse
-
#optimizable? ⇒ Boolean
private
Test if the limit is zero.
-
#optimize ⇒ Relation::Empty
private
A Limit with a limit of zero is empty.
Methods inherited from Unary
Methods included from Function::Unary
Methods inherited from Veritas::Optimizer
Constructor Details
This class inherits a constructor from Veritas::Optimizer::Relation::Operation::Unary
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 limit is zero
30 31 32 |
# File 'lib/veritas/optimizer/relation/operation/limit.rb', line 30 def optimizable? limit.zero? end |
#optimize ⇒ Relation::Empty
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.
A Limit with a limit of zero is empty
39 40 41 42 |
# File 'lib/veritas/optimizer/relation/operation/limit.rb', line 39 def optimize operation = self.operation Veritas::Relation::Empty.new(operation.header, operation) end |