Documentation Index Fetch the complete documentation index at: https://docs.helix-db.com/llms.txt
Use this file to discover all available pages before exploring further.
HelixQL is deprecated in HelixDB v2. Queries are now written with the Rust DSL and dispatched as JSON — see the Querying guide. This section is kept as a reference for legacy HelixQL projects.
For the complete documentation index optimized for AI agents, see llms.txt .
Select specific properties with ::{}
Access properties of an item by using the property names as defined in the schema.
::{<property1>, <property2>, ...}
::{<property1>: <alias>, <property2>}
Property access allows you to return only the fields you need, reducing data transfer and improving query performance.
When using the SDKs or curling the endpoint, the query name must match what is defined in the queries.hx file exactly.
Example 1: Basic property selection
QUERY GetUserBasicInfo () =>
users <- N<User>::RANGE(0, 10)
RETURN users::{name, age}
QUERY CreateUser (name: String, age: U8, email: String) =>
user <- AddN<User>({
name: name,
age: age,
email: email
})
RETURN user
See all 12 lines
Here’s how to run the query using the SDKs or curl
Python
Rust
Go
TypeScript
Curl
from helix.client import Client
client = Client( local = True , port = 6969 )
users = [
{ "name" : "Alice" , "age" : 25 , "email" : "alice@example.com" },
{ "name" : "Bob" , "age" : 30 , "email" : "bob@example.com" },
{ "name" : "Charlie" , "age" : 28 , "email" : "charlie@example.com" },
{ "name" : "Diana" , "age" : 22 , "email" : "diana@example.com" },
]
for user in users:
client.query( "CreateUser" , user)
result = client.query( "GetUserBasicInfo" , {})
print ( "User basic info:" , result)
See all 16 lines
Example 2: Property selection with renaming
QUERY GetUserDisplayInfo () =>
users <- N<User>::RANGE(0, 10)
RETURN users::{displayName: name, userAge: age}
QUERY CreateUser (name: String, age: U8, email: String) =>
user <- AddN<User>({
name: name,
age: age,
email: email
})
RETURN user
See all 12 lines
Here’s how to run the query using the SDKs or curl
Python
Rust
Go
TypeScript
Curl
from helix.client import Client
client = Client( local = True , port = 6969 )
users = [
{ "name" : "Alice" , "age" : 25 , "email" : "alice@example.com" },
{ "name" : "Bob" , "age" : 30 , "email" : "bob@example.com" },
{ "name" : "Charlie" , "age" : 28 , "email" : "charlie@example.com" },
{ "name" : "Diana" , "age" : 22 , "email" : "diana@example.com" },
]
for user in users:
client.query( "CreateUser" , user)
result = client.query( "GetUserDisplayInfo" , {})
print ( "User display info:" , result)
See all 16 lines
Access unique identifiers with ::ID
Access the unique identifier of any node, edge, or vector.
Every element in HelixDB has a unique ID that can be accessed using the ::ID syntax.
When using the SDKs or curling the endpoint, the query name must match what is defined in the queries.hx file exactly.
Example 1: Getting element IDs
QUERY GetUserIDs () =>
users <- N<User>::RANGE(0, 5)
RETURN users::ID
QUERY CreateUser (name: String, age: U8, email: String) =>
user <- AddN<User>({
name: name,
age: age,
email: email
})
RETURN user
See all 12 lines
Here’s how to run the query using the SDKs or curl
Python
Rust
Go
TypeScript
Curl
from helix.client import Client
client = Client( local = True , port = 6969 )
users = [
{ "name" : "Alice" , "age" : 25 , "email" : "alice@example.com" },
{ "name" : "Bob" , "age" : 30 , "email" : "bob@example.com" },
{ "name" : "Charlie" , "age" : 28 , "email" : "charlie@example.com" },
]
for user in users:
client.query( "CreateUser" , user)
result = client.query( "GetUserIDs" , {})
print ( "User IDs:" , result)
See all 15 lines
Include all properties with ..
Use the spread operator to include all properties while optionally remapping specific fields.
::{
<alias>: <property>,
..
}
When using the SDKs or curling the endpoint, the query name must match what is defined in the queries.hx file exactly.
Example 1: Property aliasing with spread operator
QUERY GetUsersWithAlias () =>
users <- N<User>::RANGE(0, 5)
RETURN users::{
userID: ::ID,
..
}
QUERY CreateUser (name: String, age: U8, email: String) =>
user <- AddN<User>({
name: name,
age: age,
email: email
})
RETURN user
See all 15 lines
Here’s how to run the query using the SDKs or curl
Python
Rust
Go
TypeScript
Curl
from helix.client import Client
client = Client( local = True , port = 6969 )
users = [
{ "name" : "Alice" , "age" : 25 , "email" : "alice@example.com" },
{ "name" : "Bob" , "age" : 30 , "email" : "bob@example.com" },
{ "name" : "Charlie" , "age" : 28 , "email" : "charlie@example.com" },
]
for user in users:
client.query( "CreateUser" , user)
result = client.query( "GetUsersWithAlias" , {})
print ( "Users with alias:" , result)
See all 15 lines