Skip to content

Latest commit

 

History

History
174 lines (148 loc) · 2.47 KB

File metadata and controls

174 lines (148 loc) · 2.47 KB

Boolean Operations

There are two Boolean literals: TRUE and FALSE.

We support the following Boolean operations:

OR

The following truth table defines the OR operator:

TRUE FALSE NULL
TRUE TRUE TRUE TRUE
FALSE TRUE FALSE NULL
NULL TRUE NULL NULL

AND

The following truth table defines the AND operator:

TRUE FALSE NULL
TRUE TRUE FALSE NULL
FALSE FALSE FALSE FALSE
NULL NULL FALSE NULL

NOT

The following table defines the NOT operator:

TRUE FALSE
FALSE TRUE
NULL NULL

IS FALSE

The following table defines the IS FALSE operator:

TRUE FALSE
FALSE TRUE
NULL FALSE

IS NOT FALSE

The following table defines the IS NOT FALSE operator:

TRUE FALSE
FALSE TRUE
NULL TRUE

IS TRUE

The following table defines the IS TRUE operator:

TRUE TRUE
FALSE FALSE
NULL FALSE

IS NOT TRUE

The following table defines the IS NOT TRUE operator:

TRUE FALSE
FALSE TRUE
NULL TRUE

Casting a string to a Boolean applies the following algorithm:

  • whitespaces are trimmed
  • string is converted to lowercase
  • value 'true' is converted to TRUE
  • value 'false' is converted to FALSE
  • any other string produces a runtime error

:::info

Notice that not all Boolean operations produce NULL results when an operand is NULL.