You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the great work on neo4rs! I’ve encountered an issue when executing a query with a std::time::Duration parameter. The result cannot be automatically deserialized into a BoltDuration as expected. Instead, it returns a BoltList. This causes an issue where the Duration cannot be properly deserialized into the desired type.
It would be helpful if the library could support automatic deserialization of std::time::Duration into BoltDuration, or if there’s an alternative approach to handle this correctly.
code:
use neo4rs::*;#[tokio::main]asyncfnmain(){let uri = "127.0.0.1:7687";let user = "neo4j";let pass = "neo";let graph = Graph::new(uri, user, pass).await.unwrap();let duration = std::time::Duration::new(5259600,7);letmut result = graph
.execute(query("RETURN $d as output").param("d", duration)).await.unwrap();let row = result.next().await.unwrap().unwrap();let d: std::time::Duration = row.get("output").unwrap();println!("{:?}", d);letmut result = graph
.execute(query("RETURN $d as output").param("d", duration)).await.unwrap();let row = result.next().await.unwrap().unwrap();let d= row.get::<BoltType>("output").unwrap();println!("{:?}", d);}
Thanks for the great work on neo4rs! I’ve encountered an issue when executing a query with a std::time::Duration parameter. The result cannot be automatically deserialized into a BoltDuration as expected. Instead, it returns a BoltList. This causes an issue where the Duration cannot be properly deserialized into the desired type.
It would be helpful if the library could support automatic deserialization of std::time::Duration into BoltDuration, or if there’s an alternative approach to handle this correctly.
code:
output:
The text was updated successfully, but these errors were encountered: