TypeDB 3.0 is live! Get started for free.

Operators

Arithmetic operator expressions allow computation of new values. Attributes are treated as pure values when used in an arithmetic operator expression.

Quick reference

Precedence Operator Name

1

^

exponentiation (power)

2

*

multiplication

2

/

division

2

%

modulo (remainder)

3

+

addition

3

-

subtraction

Parentheses (()) may be used to override the precedence. The sub-expressions in parentheses are always evaluated first.

(1 + 2) * 3 == 9