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.

SyntaxDescription
::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.

OperationDescriptionExample
::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.

SyntaxDescription
EXISTS(traversal)Returns true if the traversal returns any elements

Count

Count the number of elements in a traversal.

SyntaxDescription
::COUNTCount the number of elements