pub struct Options { /* private fields */ }
Expand description
Clickhouse connection options.
Implementations§
Source§impl Options
impl Options
Sourcepub fn with_compression(self) -> Self
pub fn with_compression(self) -> Self
Enable compression (defaults to false
).
Sourcepub fn pool_min(self, pool_min: usize) -> Self
pub fn pool_min(self, pool_min: usize) -> Self
Lower bound of opened connections for Pool
(defaults to 10
).
Sourcepub fn pool_max(self, pool_max: usize) -> Self
pub fn pool_max(self, pool_max: usize) -> Self
Upper bound of opened connections for Pool
(defaults to 20
).
Sourcepub fn keepalive(self, keepalive: Option<Duration>) -> Self
pub fn keepalive(self, keepalive: Option<Duration>) -> Self
TCP keep alive timeout in milliseconds (defaults to None
).
Sourcepub fn ping_before_query(self, ping_before_query: bool) -> Self
pub fn ping_before_query(self, ping_before_query: bool) -> Self
Ping server every time before execute any query. (defaults to true
).
Sourcepub fn send_retries(self, send_retries: usize) -> Self
pub fn send_retries(self, send_retries: usize) -> Self
Count of retry to send request to server. (defaults to 3
).
Sourcepub fn retry_timeout(self, retry_timeout: Duration) -> Self
pub fn retry_timeout(self, retry_timeout: Duration) -> Self
Amount of time to wait before next retry. (defaults to 5 sec
).
Sourcepub fn ping_timeout(self, ping_timeout: Duration) -> Self
pub fn ping_timeout(self, ping_timeout: Duration) -> Self
Timeout for ping (defaults to 500 ms
).
Sourcepub fn connection_timeout(self, connection_timeout: Duration) -> Self
pub fn connection_timeout(self, connection_timeout: Duration) -> Self
Timeout for connection (defaults to 500 ms
).
Sourcepub fn query_timeout(self, query_timeout: Duration) -> Self
pub fn query_timeout(self, query_timeout: Duration) -> Self
Timeout for query (defaults to 180,000 ms
).
Sourcepub fn insert_timeout(self, insert_timeout: Option<Duration>) -> Self
pub fn insert_timeout(self, insert_timeout: Option<Duration>) -> Self
Timeout for insert (defaults to 180,000 ms
).
Sourcepub fn execute_timeout(self, execute_timeout: Option<Duration>) -> Self
pub fn execute_timeout(self, execute_timeout: Option<Duration>) -> Self
Timeout for execute (defaults to 180 sec
).
Trait Implementations§
impl StructuralPartialEq for Options
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more