| Operator | Description | Example |
= | Equal | n.age = 30 |
<> | Not equal | n.status <> 'deleted' |
< | Less than | n.age < 18 |
> | Greater than | n.age > 65 |
<= | Less than or equal | n.score <= 100 |
>= | Greater than or equal | n.score >= 0 |
| Operator | Description | Example |
AND | Logical and | n.age > 18 AND n.active = true |
OR | Logical or | n.role = 'admin' OR n.role = 'mod' |
NOT | Logical not | NOT n.deleted |
XOR | Exclusive or | a.flag XOR b.flag |
| Operator | Description | Example |
IS NULL | Check for null | n.email IS NULL |
IS NOT NULL | Check for non-null | n.email IS NOT NULL |
| Operator | Description | Example |
STARTS WITH | Prefix match | n.name STARTS WITH 'A' |
ENDS WITH | Suffix match | n.email ENDS WITH '.com' |
CONTAINS | Substring match | n.bio CONTAINS 'developer' |
=~ | Regex match | n.email =~ '.*@gmail\\.com' |
| Operator | Description | Example |
IN | List membership | n.status IN ['active', 'pending'] |
+ | List concatenation | [1, 2] + [3, 4] → [1, 2, 3, 4] |
[index] | Index access | list[0] (first element) |
| Operator | Description | Example |
+ | Addition | n.price + tax |
- | Subtraction | n.total - discount |
* | Multiplication | n.quantity * n.price |
/ | Division | n.total / n.count |
% | Modulo | n.id % 10 |
| Operator | Description | Example |
+ | Concatenate strings | n.first + ' ' + n.last |
| Operator | Description | Example |
. | Property access | n.name |
From highest to lowest:
. [] - Property/index access
* / % - Multiplication, division, modulo
+ - - Addition, subtraction
= <> < > <= >= - Comparison
IS NULL IS NOT NULL
IN STARTS WITH ENDS WITH CONTAINS =~
NOT
AND
XOR
OR
Use parentheses to override precedence:
WHERE (n.age > 18 OR n.verified) AND n.active