Operators

Arithmetic Operators:

  • + (addition)

  • - (subtraction)

  • * (multiplication)

  • / (division)

  • % (modulus)

  • ** (pow)

Bitwise Operators

  • & (and)

  • | (or)

  • ^ (xor)

Comparison Operators

  • == (equal)

  • === (identical)

  • != (not equal)

  • !== (not identical)

  • < (less than)

  • > (greater than)

  • <= (less than or equal to)

  • >= (greater than or equal to)

  • matches (regex match)

  • contains

  • starts with

  • ends with

Logical Operators

  • ! (not or)

  • && (and or)

  • || (or or)

String Operators

  • ~ (concatenation)

Array Operators

  • in (contain)

  • not in (does not contain)

Numeric Operators

  • .. (range)

Ternary Operators

  • foo ? 'yes' : 'no'

  • foo ?: 'no' (equal to foo ? foo : 'no')

  • foo ? 'yes' (equal to foo ? 'yes' : '') Custom Operators

  • to_date(string)

  • agg(array)

    • agg(array).count()

    • agg(array).sumBy(path)

    • agg(array).findOneByEq(path, value)

    • agg(array).matchLabel(key, value)

  • round_down(value): int

  • round_up(value): int

  • ends_with(string, endsWith): bool

  • lower(string): string

  • starts_with(string, startsWith): bool

  • day(date): string

  • day_of_month(date): int

  • month(date): string

  • is_after(valueDate, afterDate): bool

  • is_before(valueDate, beforeDate): bool

  • is_between(valueDate, beforeDate, afterDate): bool

  • is_not_between(valueDate, beforeDate, afterDate): bool

  • is_time_between(valueDate, beforeDate, afterDate): bool

  • timestamp(date): int


To find out more, please refer to the articles below:

Expression ExamplesSample Use Cases

Last updated