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§

source

const COLUMN_COUNT: Option<usize>

If Some, serialize_row and deserialize_row MUST return this number of columns

Required Methods§

source

fn column_names() -> Option<Vec<Cow<'static, str>>>

If Some, serialize_row and deserialize_row MUST have these names

source

fn deserialize_row(map: Vec<(&str, &Type, Value)>) -> Result<Self>

source

fn serialize_row(
    self,
    type_hints: &[&Type]
) -> Result<Vec<(Cow<'static, str>, Value)>>

Implementors§