orientdb-rs
orientdb-rs copied to clipboard
Field not found with `sugar` mapping
The mapping to structs should use optional when specified for optional fields.
Currently this emit an error
#[derive(orientdb_client::derive::FromResult, Debug, PartialEq)]
struct Person {
name: String,
age : Option<i32>
}
let result: Option<Person> = session
.query("select from OUser where name = ?")
.positional(&[&"admin"])
.fetch_one()
.unwrap();
but it should work since age is optional