Method: Contentstack::Query#less_than

Defined in:
lib/contentstack/query.rb

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

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

Example

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

Parameters:

  • field_uid (String)

    UID of the field for which query should be executed

  • value (String/Number)

    Value that provides an upper bound

Returns:

[View source]

179
180
181
182
# File 'lib/contentstack/query.rb', line 179

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