-
-
Notifications
You must be signed in to change notification settings - Fork 168
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
getting Null returned from spread operator. see logs provided
Steps to reproduce
sample rust ingestion
use helix_rs::{HelixDB, HelixDBClient};
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = HelixDB::new(Some("http://localhost"), Some(6969), None);
let users = vec![
("Alice", 25, "[email protected]"),
("Bob", 30, "[email protected]"),
("Charlie", 28, "[email protected]"),
];
for (name, age, email) in &users {
let _created: serde_json::Value = client.query("CreateUser", &json!({
"name": name,
"age": age,
"email": email,
})).await?;
}
let result: serde_json::Value = client.query("GetUsersWithAlias", &json!({})).await?;
println!("Users with alias: {result:#?}");
Ok(())
}
query
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
schema
N::User {
name: String,
age: U8,
email: String
}
Version
1.0.136
Environment
Development/Local
Relevant log output
"users": Array [
Object {
"age": Number(25),
"email": String("[email protected]"),
"id": String("1f09426f-1404-6fcc-bd5e-010203040506"),
"label": String("User"),
"name": String("Alice"),
"userID": Null,
},Additional context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working