pub trait Row: Sized {
const COLUMN_COUNT: Option<usize>;
// Required methods
fn column_names() -> Option<Vec<Cow<'static, str>>>;
fn deserialize_row(map: Vec<(&str, &Type, Value)>) -> Result<Self>;
fn serialize_row(
self,
type_hints: &IndexMap<String, Type>,
) -> Result<Vec<(Cow<'static, str>, Value)>>;
}Expand description
A row that can be deserialized and serialized from a raw Clickhouse SQL value.
Generally this is not implemented manually, but using nativeclick_derive::Row.
I.e. #[derive(nativeclick::Row)].
Required Associated Constants§
Sourceconst COLUMN_COUNT: Option<usize>
const COLUMN_COUNT: Option<usize>
If Some, serialize_row and deserialize_row MUST return this number of columns
Required Methods§
Sourcefn column_names() -> Option<Vec<Cow<'static, str>>>
fn column_names() -> Option<Vec<Cow<'static, str>>>
If Some, serialize_row and deserialize_row MUST have these names
fn deserialize_row(map: Vec<(&str, &Type, Value)>) -> Result<Self>
fn serialize_row( self, type_hints: &IndexMap<String, Type>, ) -> Result<Vec<(Cow<'static, str>, Value)>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".