Crate clickhouse_bb8

Crate clickhouse_bb8 

Source
Expand description

ClickHouse-BB8 is a ClickHouse client pool manager compatible with BB8.

It allows you to configure a pool of Rust clients for ClickHouse that can be reused without sharing the underlying HTTP client connection.

§Example

use clickhouse_bb8::{ConnectionBuilder, ConnectionManager, Pool};

let builder = ConnectionBuilder::new()
    .with_url("http://localhost:8123")
    .with_database("my_database");

let manager = ConnectionManager::new(builder);
let pool = Pool::builder()
    .build(manager)
    .await
    .unwrap();

let conn = pool.get().await.unwrap();
// Use conn for queries

Structs§

Connection
A connection to ClickHouse with health status tracking.
ConnectionBuilder
Builder for creating ClickHouse clients with custom configuration.
ConnectionManager
Connection manager for ClickHouse clients that implements BB8’s ManageConnection trait.

Enums§

ClickHouseError
Errors that can occur during connection management.

Type Aliases§

Pool
Type alias for a BB8 pool of ClickHouse connections.