Stellar Language Quick Reference
Also available as:
PDF

Stellar Boolean Expressions

In Stellar, you can use variables in boolean expressions and variables that are not explicitly interpreted as Booleans subject to specifies rules.

Stellar optimizes Boolean searches with a short-circuit rule evaluation. With short-circuit evaluation, the second argument is executed or evaluated only if the first argument does not suffice to determine the value of the expression. In other words, for a Boolean search of A AND B, if A is false, then B is not evaluated. This is very useful for enrichments that are expensive to run due to external lookups.

In Stellar, if you use variables in Boolean expressions or variables that are not explicitly Boolean, these variables will be subject to the following rules:

  • Similar to python and javascript, empty collections (for example, []) will be interpreted as false
  • Similar to python and javascript, missing variables will be interpreted as false
  • Variables set to null will be interpreted as false