pub trait ChRecord: Sized {
// Required methods
fn ch_schema() -> TableSchema;
fn into_ch_record(self) -> Record;
fn from_ch_record(record: Record) -> Result<Self, Error>;
// Provided methods
fn to_query_data(records: Vec<Self>) -> QueryData { ... }
fn from_query_data(data: QueryData) -> Result<Vec<Self>, Error> { ... }
}Expand description
A trait to convert from/to a Clickhouse Record
Required Methods§
Sourcefn ch_schema() -> TableSchema
fn ch_schema() -> TableSchema
Returns the Clickhouse schema
Sourcefn into_ch_record(self) -> Record
fn into_ch_record(self) -> Record
Converts to a Record
Provided Methods§
Sourcefn to_query_data(records: Vec<Self>) -> QueryData
fn to_query_data(records: Vec<Self>) -> QueryData
Converts records to a [QueryTable]
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.