WhereBetween Object

The WhereBetween Object is a WhereExpression subclass that contains an SQL between expression. It can be used to express that a value is between two things (greater than or equal to the left side of the expression, less than or equal to the right side of the expression).

Where expressions are used to filter a request by applying extra conditions. They are generally stored as XML formatted strings, however, the scripting implementation can unwrap these into a tree. The WhereBuilder object can be used to create new instances of these objects.

The code snippet below shows how the WhereBetween Object can be used:

 var LowerValue = WhereBuilder.createConstant(lowerValue,'int');
 var UpperValue = WhereBuilder.createConstant(upperValue,'int');
 var BetweenCond = WhereBuilder.createBetween(WhereBuilder.createField('Orders','OrderID'),LowerValue,UpperValue);

Properties

lower

Represents the lower value; this is lowest allowed value (i.e. the value must be equal to or more than lower).

value

Represents the actual value to compare the lower and upper values to.

upper

Represents the upper bound of this expression, the evaluated result of the value has to be less or equal to this upper case.