Crates.io | klickhouse |
lib.rs | klickhouse |
version | 0.13.2 |
source | src |
created_at | 2021-05-28 20:47:12.055714 |
updated_at | 2024-11-14 20:45:10.546562 |
description | Klickhouse is a pure Rust SDK for working with Clickhouse with the native protocol in async environments with minimal boilerplate and maximal performance. |
homepage | |
repository | https://github.com/Protryon/klickhouse |
max_upload_size | |
id | 403311 |
size | 394,896 |
Klickhouse is a pure Rust SDK for working with Clickhouse with the native protocol in async environments with minimal boilerplate and maximal performance.
See example usage.
Enum8
and Enum16
types -- use LowCardinality
instead.A Clickhouse server is required to run the integration tests. One can be started easily in a Docker container:
$ docker run --rm --name clickhouse -p 19000:9000 --ulimit nofile=262144:262144 clickhouse
$ export KLICKHOUSE_TEST_ADDR=127.0.0.1:19000
$ # export KLICKHOUSE_TEST_USER=default
$ # export KLICKHOUSE_TEST_PASSWORD=default
$ # export KLICKHOUSE_TEST_DATABASE=default
$ cargo nextest run
(running the tests simultaneously with cargo test
is currently not suported, due to loggers initializations.)
derive
: Enable [klickhouse_derive], providing a derive macro for the [Row] trait. Default.compression
: lz4
compression for client/server communication. Default.serde
: Derivation of [serde::Serialize] and [serde::Deserialize] on various objects, and JSON support. Default.tls
: TLS support via tokio-rustls.refinery
: Migrations via refinery.geo-types
: Conversion of geo types to/from the geo-types crate.bb8
: Enables a ConnectionManager
managed by bb8klickhouse_derive
was made by copy/paste/simplify of serde_derive
to get maximal functionality and performance at lowest time-cost. In a prototype, serde
was directly used, but this was abandoned due to lock-in of serde
's data model.