clickhouse.rs
clickhouse.rs copied to clipboard
Rename all doesn't work?)
Hi! I use your lib fo project and use this code:
#[derive(Row, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RowSpeedLane {
#[serde(rename = "id")]
#[serde(with = "clickhouse::serde::uuid")]
pub uuid: Uuid,
#[serde(rename = "fixationTime")]
pub detect_time: i64,
#[serde(rename = "extComplexId")]
pub complex_id: String,
#[serde(rename = "extDetectorId")]
pub detector_id: String,
pub ext_lane_number: i8,
pub ext_vehicle_speed: f64,
}
After Serialize i expext, that field ext_lane_number
will be extLaneNumber
(worked [serde(rename_all = "camelCase")
) , but i get this:
Err(bad response: Code: 16, e.displayText() = DB::Exception: No such column ext_lane_number in table tda_demo.count_by_lane (143a1954-1aed-4b87-943a-19541aed8b87) (version 21.7.4.18 (official build)))
Thank for attantion!
Hi, Row
doesn't support rename_all
for now, only rename
. It's not a big problem to implement it by using the heck
crate, but I have no time for it for now.