#clickhouse #database #generator

bin+lib ch2rs

Generate Rust structs from ClickHouse rows

4 releases

0.1.3 Jul 29, 2021
0.1.2 Jun 1, 2021
0.1.1 May 31, 2021
0.1.0 May 29, 2021

#254 in Development tools

22 downloads per month

MIT license

20KB
484 lines

ch2rs

Usage

cargo install ch2rs

Help

$ ch2rs --help
ch2rs 0.1.0

USAGE:
    ch2rs [FLAGS] [OPTIONS] <table>

FLAGS:
    -D               Generate `Deserialize` instances
    -h, --help       Prints help information
        --owned      Generate only owned types
    -S               Generate `Serialize` instances
    -V, --version    Prints version information

OPTIONS:
    -B <bytes>...            Add `#[serde(with = "serde_bytes")]` to the provided column
    -d <database>            A database where the table is placed in [default: default]
    -O <overrides>...        Override the type of the provided column
    -p <password>
    -T <types>...            Override the type, e.g. 'Decimal(18, 9)=fixnum::FixedPoint<i64, typenum::U9>'
    -U <url>                 ClickHouse server's URL [default: localhost:8123]
    -u <user>

ARGS:
    <table>    The table's name

Examples

See snapshots.

Dependencies

~10MB
~209K SLoC