Class | Mongoid::Criterion::Complex |
In: |
lib/mongoid/criterion/complex.rb
|
Parent: | Object |
Complex criterion are used when performing operations on symbols to get get a shorthand syntax for where clauses.
@example Conversion of a simple to complex criterion.
{ :field => { "$lt" => "value" } } becomes: { :field.lt => "value }
key | [RW] | |
operator | [RW] |
Is the criterion equal to the other?
@example Check equality.
criterion == other
@param [ Complex ] other The other complex criterion.
@return [ true, false ] If they are equal.
Is the criterion equal to the other?
@example Check equality.
criterion.eql?(other)
@param [ Complex ] other The other complex criterion.
@return [ true, false ] If they are equal.
Create a mongo query with given value
@example Create query
criterion.to_mongo_hash(value)
@params [] Whatever is a valid input for given operator @return [ Hash ] The query