pub struct ClientHandle { /* private fields */ }
Expand description
Clickhouse client handle.
Implementations§
Source§impl ClientHandle
impl ClientHandle
pub async fn ping(&mut self) -> Result<()>
Sourcepub fn query<Q>(&mut self, sql: Q) -> QueryResult<'_>
pub fn query<Q>(&mut self, sql: Q) -> QueryResult<'_>
Executes Clickhouse query
on Conn.
Sourcepub async fn execute<Q>(&mut self, sql: Q) -> Result<()>
pub async fn execute<Q>(&mut self, sql: Q) -> Result<()>
Convenience method to prepare and execute a single SQL statement.
Sourcepub async fn insert<Q, B>(&mut self, table: Q, block: B) -> Result<()>
pub async fn insert<Q, B>(&mut self, table: Q, block: B) -> Result<()>
Convenience method to insert block of data.
Sourcepub async fn check_connection(&mut self) -> Result<()>
pub async fn check_connection(&mut self) -> Result<()>
Check connection and try to reconnect if necessary.
Trait Implementations§
Source§impl Debug for ClientHandle
impl Debug for ClientHandle
Auto Trait Implementations§
impl !Freeze for ClientHandle
impl !RefUnwindSafe for ClientHandle
impl Send for ClientHandle
impl Sync for ClientHandle
impl Unpin for ClientHandle
impl !UnwindSafe for ClientHandle
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more