Packages / rupm

rs-db-driver-clickhouse-clickhouse 0.1.0

ClickHouse: clickhouse (the driver, re-exported, with a runnable example)

Install

cargo add rs-db-driver-clickhouse-clickhouse --registry rupm

In Ruststudio: Packages, search for rs-db-driver-clickhouse-clickhouse, Install.

Owner: Rust Studio. Licence: MIT OR Apache-2.0. Total downloads: 0. Published 2026-11-23.

Versions

README

# rs-db-driver-clickhouse-clickhouse

ClickHouse - clickhouse: async HTTP client

Add it with `rupm add rs-db-driver-clickhouse-clickhouse` (or `cargo add rs-db-driver-clickhouse-clickhouse --registry rupm`). The driver `clickhouse` is re-exported as `rs_db_driver_clickhouse_clickhouse::clickhouse`.

This driver is async: your project also needs an async runtime, for example `cargo add tokio --features macros,rt-multi-thread`.

## Example

```rust
use clickhouse::{Client, Row};
use serde::Deserialize;

#[derive(Row, Deserialize)]
struct One {
    n: u8,
}

#[tokio::main]
async fn main() -> clickhouse::error::Result<()> {
    let client = Client::default().with_url("http://localhost:8123").with_user("default");
    let one = client.query("SELECT 1 AS n").fetch_one::<One>().await?;
    println!("the server answered {}", one.n);
    Ok(())
}
```