1 unstable release
| 0.0.1 | Jul 2, 2023 |
|---|
#58 in #clickhouse
Used in streamhouse
6KB
111 lines
Streamhouse

A strongly typed client for ClickHouse that returns a stream of rows.
- Uses simple
Rowtrait (notserde!) for encoding/decoding rows. - Uses
RowBinaryWithNamesAndTypesencoding to ensure type safety. - Supports HTTP (and HTTPS unknown?).
- Provides API for selecting.
- Provides API for inserting.
- TODO: Compression and decompression (LZ4).
Comparison with the clickhouse crate
- Both provide similar performance, with
clickhousebeing a little faster. - Unlike
clickhousewhich has an unsound API,streamhousedoes not use unsafe (and thus provides a sound API). streamhouseprovides afutures::Streamof rows, whereclickhouseonly creates a stream-likeRowCursor.- In
clickhouse, an error in which two columns are swapped in order can give incorrect results. Withstreamhousethis error is caught and reported. - Because
clickhouseusesserdeinternally, it is not convenient to create a type that can be used with a different serialization (e.g. when converted to JSON) than its internal representation in clickhouse.streamhouseuses its own traits, so your types can have independent representations as clickhouse columns versus other serializations you may wish to use.
Dependencies
~1.5MB
~39K SLoC