HelixQL
Conditions
Filter and conditionally select elements in your graph
Filtering Operations
These operations allow you to filter and select specific elements from your graph based on conditions.
Where Clause
Filter elements based on specific conditions.
Syntax | Description |
---|---|
::WHERE(condition) | Filter elements that satisfy the condition |
Comparison Operations
Returns a boolean value, which can be used in a WHERE clause to filter elements.
Operation | Description | Example |
---|---|---|
::GT(value) | Greater than | ::WHERE(_::{age}::GT(25)) |
::LT(value) | Less than | ::WHERE(_::{age}::LT(30)) |
::EQ(value) | Equals | ::WHERE(_::{status}::EQ("active")) |
::NEQ(value) | Not equals | ::WHERE(_::{status}::NEQ("deleted")) |
::GTE(value) | Greater than or equal | ::WHERE(_::{rating}::GTE(4.5)) |
::LTE(value) | Less than or equal | ::WHERE(_::{priority}::LTE(2)) |
Existence Check
Check if elements exist that match a given condition.
Syntax | Description |
---|---|
EXISTS(traversal) | Returns true if the traversal returns any elements |
Count
Count the number of elements in a traversal.
Syntax | Description |
---|---|
::COUNT | Count the number of elements |
Was this page helpful?