Operators

All the operators you can use in RQL expressions.

Arithmetic Operators

OperatorDescriptionExample
+Additionprice + tax
-Subtractiontotal - discount
*Multiplicationquantity * price
/Divisiontotal / count
//Integer divisiontotal // 10
%Moduloid % 2

Comparison Operators

OperatorDescriptionExample
==Equalstatus == "active"
!=Not equalrole != "guest"
>Greater thanage > 18
<Less thanprice < 100
>=Greater or equalcount >= 10
<=Less or equalstock <= 5
~=Pattern matchemail ~= "%@gmail.com"

Logical Operators

OperatorDescriptionExample
&&Logical ANDactive && verified
||Logical ORadmin || moderator
??Null coalescenickname ?? name

Other Operators

OperatorDescriptionExample
->Field accessuser->address
=>Lambda expressionx => x * 2