clickhouse-macros 0.3.0

Renamed from clickhouse-derive. A macro for deriving clickhouse::Row
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
---
source: derive/src/tests/cases.rs
---
#[derive(Row)]
struct Sample<'a, A, B> {
    a: A,
    b: &'a B,
}

/****** GENERATED ******/
#[automatically_derived]
impl<'a, A, B> clickhouse::Row for Sample<'a, A, B> {
    const NAME: &'static str = stringify!(Sample);
    const COLUMN_NAMES: &'static [&'static str] = &["a", "b"];
    const COLUMN_COUNT: usize = <Self as clickhouse::Row>::COLUMN_NAMES.len();
    const KIND: clickhouse::_priv::RowKind = clickhouse::_priv::RowKind::Struct;
    type Value<'__v> = Sample<'__v, A, B>;
}