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 queriesStructs§
- Connection
- A connection to ClickHouse with health status tracking.
- Connection
Builder - Builder for creating ClickHouse clients with custom configuration.
- Connection
Manager - Connection manager for ClickHouse clients that implements BB8’s
ManageConnectiontrait.
Enums§
- Click
House Error - Errors that can occur during connection management.
Type Aliases§
- Pool
- Type alias for a BB8 pool of ClickHouse connections.