TDABinaryOperator

Overview

The TDABinaryOperator enumeration denotes the binary operator applied to operands of a TDABinaryExpression expression.

For example in this code snippet TDABinaryOperator value is used to represent equality operand:

WhereExpression  := TDABinaryExpression.Create(
                          TDAFieldExpression.Create("ID"), 
                          TDAConstantExpression.Create(42), 
                          dboEqual);

The TDABinaryOperator enumeration is widely used when Dynamic Where expressions are created in code.

The following table shows how TDABinaryOperator values are translated into human-readable expressions.

Location

  • Unit: uDAWhere.pas
Value Description
dboAddition left + right
dboAnd left and right
dboConcat left || right
dboDivide left / right
dboEqual left = right
dboGreater left > right
dboGreaterOrEqual left >= right
dboIn left in right

Usually applied when right operator is a TDAListExpression expression
dboLess left < right
dboLessOrEqual left <= right
dboLike left LIKE right

where right is a String value that conforms to the template format of the LIKE SQL operation
dboModulo left % right
or
left MOD right
or
MOD(left, right)

uses above syntax, depending on database
dboMultiply left * right
dboNotEqual left <> right
dboNotIn (left not in right)

Usually applied when right operator is a TDAListExpression expression
dboNotLike left NOT LIKE right

where right is a String value that conforms to the template format of the NOT LIKE SQL operation
dboOr left or right
dboSubtraction left - right
dboXor left xor right