Class Plucky::CriteriaHash
In: lib/plucky/criteria_hash.rb
Parent: Object

Methods

==   []   []=   initialize_copy   keys   merge   merge!   new   object_id?   object_ids   object_ids=   simple?   to_hash  

Constants

SimpleIdQueryKeys = [:_id].to_set   Internal: Used to determine if criteria keys match simple id lookup.
SimpleIdAndTypeQueryKeys = [:_id, :_type].to_set   Internal: Used to determine if criteria keys match simple id and type lookup (for single collection inheritance).
SimpleQueryMaxSize = [SimpleIdQueryKeys.size, SimpleIdAndTypeQueryKeys.size].max   Internal: Used to quickly check if it is possible that the criteria hash is simple.

Attributes

options  [R]  Private: The Hash that stores options
source  [R]  Private: The Hash that stores query criteria

Public Class methods

Public Instance methods

Public

Public The contents of this make me sad...need to clean it up

Public

Public: The definition of simple is querying by only _id or _id and _type. If this is the case, you can use IdentityMap in library to not perform query and instead just return from map.

Returns true or false

[Validate]