HelixQL
Operations
Manipulate and query your graph data with powerful operations
Graph Operations Overview
Helix QL provides a rich set of operations to create, modify, filter, and aggregate graph data. These operations allow you to build powerful graph applications with concise, expressive queries.
Creation Operations
These operations allow you to add new elements to your graph.
Adding Nodes (AddN
)
Create new nodes in your graph.
Syntax | Description |
---|---|
AddN<Type> | Add a node of the specified type |
AddN<Type>({properties}) | Add a node with properties |
Adding Edges (AddE
)
Create connections between nodes in your graph.
Syntax | Description |
---|---|
AddE<Type>::From(v1)::To(v2) | Add an edge of specified type from v1 to v2 |
AddE<Type>({properties})::From(v1)::To(v2) | Add an edge with properties |
You can also use the AddE
operation in the middle of a traversal to add edges between a list of nodes or vectors.
Updating Elements (UPDATE
)
Update the properties of existing elements.
Syntax | Description |
---|---|
::UPDATE({<properties_list>}) | overwrites the listed properties with the new values |
::UPDATE({name: "John"}) | Updates the name of the selected element to “John” |
Dropping Elements (DROP
)
Drop/Delete elements from your database.
Syntax | Description |
---|---|
DROP <elements> | Elements can be defined by a traversal or by variable reference to the elements |
Was this page helpful?