Module DataMapper::Query::Conditions::FlattenOperation
In: lib/dm-core/query/conditions/operation.rb

Methods

<<  

Public Instance methods

Add an operand to the operation, flattening the same types

Flattening means that if the operand is the same as the operation, we should just include the operand‘s operands in the operation and prune that part of the tree. This results in a shallower tree, is faster to match and usually generates more efficient queries in the adapters.

@param [AbstractOperation, AbstractComparison, Array] operand

  the operand to add

@return [self]

  the operation

@api semipublic

[Validate]