def where fields = {}, operation = 'and'
      fields.each_pair do |k, value|
        field = (k.respond_to?(:field) ? k.field : k).to_s
        comparation = k.respond_to?(:comparation) ? k.comparation : '='

        # Range syntatic sugar
        value = [ value.first, value.last ] if value.kind_of?(Range)

        @wheres << [field, comparation, value, operation]
      end
      self
    end
def where fields = {}, operation = 'and'
      fields.each_pair do |k, value|
        field = (k.respond_to?(:field) ? k.field : k).to_s
        comparation = k.respond_to?(:comparation) ? k.comparation : '='

        # Range syntatic sugar
        value = [ value.first, value.last ] if value.kind_of?(Range)

        @wheres << [field, comparation, value, operation]
      end
      self
    end
Add where clause to the current query.

 Supported modifiers on fields: .gt, .gte, .lt, .lte, .ne, .in, .not_in, .nin, .like, .between, .not_between

 @param fields [Hash] fields and values to filter
 @param [String] operation (and, or)

 @example
     hook.collection(:movies).where({
       :name => "Hook",
       :year.gt => 1990
     })

 @example Using Range
     hook.collection(:movies).where({
       :name.like => "%panic%",
       :year.between => 1990..2014
     })

 @return [Collection] self