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<T> {
    a: i32,
    b: T,
}

/****** GENERATED ******/
#[automatically_derived]
impl<T> clickhouse::Row for Sample<T> {
    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> = Self;
}