Method: Contentstack::Query#greater_than_or_equal

Defined in:
lib/contentstack/query.rb

#greater_than_or_equal(field_uid, value) ⇒ Contentstack::Query

Add a constraint to the query that requires a particular key entry to be greater than or equal to the provided value.

Example

@query = @stack.content_type('product').query
@query.greater_than_or_equal('price', '100')

Parameters:

  • field_uid (String)

    UID of the field for which query should be executed

  • value (String/Number)

    Value that provides a lower bound

Returns:


227
228
229
230
# File 'lib/contentstack/query.rb', line 227

def greater_than_or_equal(field_uid, value)
  add_query_hash({:"#{field_uid}" => {"$gte" => value}})
  self
end