clickhouse.rs
clickhouse.rs copied to clipboard
Support Nested more convenient
Right now it can be done using separate arrays:
#[derive(Debug, Row, Serialize, Deserialize)]
struct MyRowOwned {
no: u32,
#[serde(rename = "nested.a")]
a: Vec<f64>,
#[serde(rename = "nested.b")]
b: Vec<f64>,
}
However it can be more convenient to detect following pattern:
#[derive(Debug, Row, Serialize, Deserialize)]
struct MyRowOwned {
no: u32,
nested: Vec<Nested>,
}
#[derive(Debug, Row, Serialize, Deserialize)]
struct Nested {
a: f64,
b: f64,
}