ESQL logical operators

ESQL provides the following logical operators:

Operator AND
The result is the logical AND of the two operands. Both operands must be boolean values.
Operator OR
The result is the logical OR of the two operands. Both operands must be boolean values.
Operator NOT
The result is the logical NOT of the operand, which must be a boolean value.

NULL and UNKNOWN values are treated as special values by these operators. The principles are:

The result of AND and OR operations is defined by the following table.

Value of P Value of Q Result of P AND Q Result of P OR Q
TRUE TRUE TRUE TRUE
TRUE FALSE FALSE TRUE
TRUE UNKNOWN UNKNOWN TRUE
FALSE TRUE FALSE TRUE
FALSE FALSE FALSE FALSE
FALSE UNKNOWN FALSE UNKNOWN
UNKNOWN TRUE UNKNOWN TRUE
UNKNOWN FALSE FALSE UNKNOWN
UNKNOWN UNKNOWN UNKNOWN UNKNOWN

The result of NOT operations is defined by the following table.

Operand Result of NOT
TRUE FALSE
FALSE TRUE
UNKNOWN UNKNOWN
Related concepts
Message flows overview
ESQL operators
Message mappings overview
Related tasks
Developing message flows
Developing ESQL
Related reference
Built-in nodes
ESQL reference
ESQL simple comparison operators
ESQL numeric operators
Rules for ESQL operator precedence