Methods

Class Index [+]

Quicksearch

DataMapper::Query::Conditions::FlattenOperation

Public Instance Methods

<<(operand) click to toggle source

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

     # File lib/dm-core/query/conditions/operation.rb, line 431
431:         def <<(operand)
432:           if kind_of?(operand.class)
433:             merge(operand.operands)
434:           else
435:             super
436:           end
437:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.