Module: Dynomite::Item::Query::Relation::ComparisionMap

Included in:
Params::Function::SizeFn, WhereGroup
Defined in:
lib/dynomite/item/query/relation/comparision_map.rb

Constant Summary collapse

COMPARISION_MAP =
{
  'eq' => '=',
  'gt' => '>',
  'gte' => '>=',
  'lt' => '<',
  'lte' => '<=',
}

Instance Method Summary collapse

Instance Method Details

#comparision_for(operator) ⇒ Object



11
12
13
# File 'lib/dynomite/item/query/relation/comparision_map.rb', line 11

def comparision_for(operator)
  COMPARISION_MAP[operator] || operator
end

#comparision_operatorsObject



15
16
17
# File 'lib/dynomite/item/query/relation/comparision_map.rb', line 15

def comparision_operators
  COMPARISION_MAP.keys + COMPARISION_MAP.values
end