Range

Range

Represents the clause of range condition.

Constructor

new Range(field, upperLimit, upperIncluded, lowerLimit, lowerIncluded)

Create a range condition.
Parameters:
Name Type Description
field string Field name of comparison.
upperLimit number The upper limit of the range.
upperIncluded boolean Boolean field that indicates if the upper limit is contained in the range, if omitted is considered as "true".
lowerLimit number The upper lower of the range.
lowerIncluded boolean Boolean field that indicates if the lower limit is contained in the range, if omitted is considered as "true".
Properties:
Name Type Description
field string Field name of comparison.
upperLimit number The upper limit of the range.
upperIncluded boolean Boolean field that indicates if the upper limit is contained in the range, if omitted is considered as "true".
lowerLimit number The lower limit of the range.
lowerIncluded boolean Boolean field that indicates if the lower limit is contained in the range, if omitted is considered as "true".

Methods

(static) fromJson(obj) → {Range}

This method is for internal use only.
Parameters:
Name Type Description
obj JSON object that represented a range condition.
Returns:
Range instance
Type
Range

(static) greaterThan(field, lowerLimit)

Create a Range instance of the less than.
Parameters:
Name Type Description
field string Field name of comparison.
lowerLimit number The upper lower of the range.

(static) greaterThanEquals(field, lowerLimit)

Create a Range instance of the less than or equals.
Parameters:
Name Type Description
field string Field name of comparison.
lowerLimit number The upper lower of the range.

(static) lessThan(field, upperLimit)

Create a Range instance of the greater than.
Parameters:
Name Type Description
field string Field name of comparison.
upperLimit number The upper limit of the range.

(static) lessThanEquals(field, upperLimit)

Create a Range instance of the greater than or equals.
Parameters:
Name Type Description
field string Field name of comparison.
upperLimit number The upper limit of the range.

toJson() → {Object}

This method is for internal use only.
Returns:
JSON object that represented this instance.
Type
Object