Asynchronous Yandex ClickHouse client library for rust programming language.
Library hosted on crates.io.
[dependencies]
clickhouse-rs = "*"
- Date
- DateTime
- Decimal(P, S)
- Float32, Float64
- String, FixedString(N)
- UInt8, UInt16, UInt32, UInt64, Int8, Int16, Int32, Int64
- Nullable(T)
- Array(UInt/Int/Float/String/Date/DateTime)
- IPv4/IPv6
- UUID
schema:https://user:password@host[:port]/database?param1=value1&...¶mN=valueN
parameters:
-
compression
- Whether or not use compression (defaults tonone
). Possible choices:none
lz4
-
readonly
- Restricts permissions for read data, write data and change settings queries. (defaults tonone
). Possible choices:0
- All queries are allowed.1
- Only read data queries are allowed.2
- Read data and change settings queries are allowed.
-
connection_timeout
- Timeout for connection (defaults to500 ms
) -
query_timeout
- Timeout for queries (defaults to180 sec
). -
insert_timeout
- Timeout for inserts (defaults to180 sec
). -
execute_timeout
- Timeout for execute (defaults to180 sec
). -
keepalive
- TCP keep alive timeout in milliseconds. -
nodelay
- Whether to enableTCP_NODELAY
(defaults totrue
). -
pool_min
- Lower bound of opened connections forPool
(defaults to10
). -
pool_max
- Upper bound of opened connections forPool
(defaults to20
). -
ping_before_query
- Ping server every time before execute any query. (defaults totrue
). -
send_retries
- Count of retry to send request to server. (defaults to3
). -
retry_timeout
- Amount of time to wait before next retry. (defaults to5 sec
). -
ping_timeout
- Timeout for ping (defaults to500 ms
). -
alt_hosts
- Comma separated list of single address host for load-balancing.
example:
tcp:https://user:password@host:9000/clicks?compression=lz4&ping_timeout=42ms
clickhouse-rs
puts some functionality behind optional features to optimize compile time
for the most common use cases. The following features are available.