WhereBinary Object
The WhereBinary Object is a WhereExpression subclass with a binary expression in it, like left OPERATOR right
. It's used to store expressions with two operands like 1 + 1.
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 WhereBinary Object can be used:
var Fields = ['Id','Name','Phone','Address','Remarks','Discount'];
var Expression = WhereBuilder.createBinary( WhereBuilder.createField('Id'), WhereBuilder.createConstant('CustomValue'), 'Equal');
var result = lda.selectWhere('Customers',Fields,Expression,{});
Properties
left
Gets/Sets the left side of the expression, it can contain any other WhereExpression Object.
right
Gets/Sets the right side of the expression, it can contain any other WhereExpression Object.
operator
Gets/Sets the operator for this expression. Can be one of these strings:
And
Or
Xor
Less
LessOrEqual
Equal
NotEqual
GreaterOrEqual
Greater
Like
NotLike
In
NotIn
Addition
Subtraction
Multiply
Divide
Modulo