Trait klickhouse::Row
source · pub trait Row: Sized {
const COLUMN_COUNT: Option<usize>;
fn column_names() -> Option<Vec<Cow<'static, str>>>;
fn deserialize_row(map: Vec<(&str, &Type, Value)>) -> Result<Self>;
fn serialize_row(
self,
type_hints: &[&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 klickhouse_derive::Row
.
I.e. #[derive(klickhouse::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