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
Source§impl Drop for ClientHandle
impl Drop for ClientHandle
Auto Trait Implementations§
impl !Freeze for ClientHandle
impl !RefUnwindSafe for ClientHandle
impl !UnwindSafe for ClientHandle
impl Forget for ClientHandle
impl Move for ClientHandle
impl Send for ClientHandlewhere
I32NotAllOnes: Send,
Atomic<usize>: Send,
Registration: Send,
BoxRaw<dyn State<ClientConnectionData>>: Send,
RawVecInner: Send,
&'static str: Send,
Arc<dyn Error + Sync + Send>: Send,
&'static Tls12CipherSuite: Send,
&'static Tls13CipherSuite: Send,
BoxRaw<dyn MessageEncrypter>: Send,
BoxRaw<dyn MessageDecrypter>: Send,
&'static [u8]: Send,
&'static dyn Algorithm: Send,
Repr: Send,
Arc<Mutex<State>>: Send,
Arc<Vec<u8>>: Send,
NonZero<i32>: Send,
TzOffset: Send,
&'static SqlType: Send,
BoxRaw<Value>: Send,
Arc<Vec<Value>>: Send,
Arc<HashMap<Value, Value>>: Send,
Arc<Vec<(String, Value)>>: Send,
Arc<dyn ColumnData + Sync + Send>: Send,
BoxRaw<Cmd>: Send,
RawTable<((usize, Scanned), Scan)>: Send,
Arc<TransportStatus>: Send,
Arc<Inner>: Send,
impl Sync for ClientHandlewhere
I32NotAllOnes: Sync,
Atomic<usize>: Sync,
Registration: Sync,
BoxRaw<dyn State<ClientConnectionData>>: Sync,
RawVecInner: Sync,
Arc<dyn Error + Sync + Send>: Sync,
BoxRaw<dyn MessageEncrypter>: Sync,
BoxRaw<dyn MessageDecrypter>: Sync,
Repr: Sync,
Arc<Mutex<State>>: Sync,
Arc<Vec<u8>>: Sync,
NonZero<i32>: Sync,
TzOffset: Sync,
BoxRaw<Value>: Sync,
Arc<Vec<Value>>: Sync,
Arc<HashMap<Value, Value>>: Sync,
Arc<Vec<(String, Value)>>: Sync,
Arc<dyn ColumnData + Sync + Send>: Sync,
BoxRaw<Cmd>: Sync,
RawTable<((usize, Scanned), Scan)>: Sync,
Arc<TransportStatus>: Sync,
Arc<Inner>: Sync,
impl Unpin for ClientHandle
impl UnsafeUnpin for ClientHandlewhere
I32NotAllOnes: UnsafeUnpin,
Align8<usize>: UnsafeUnpin,
*const ArcInner<Handle> is !null: UnsafeUnpin,
PhantomData<ArcInner<Handle>>: UnsafeUnpin,
*const ArcInner<Handle> is !null: UnsafeUnpin,
PhantomData<ArcInner<Handle>>: UnsafeUnpin,
*const ArcInner<ScheduledIo> is !null: UnsafeUnpin,
PhantomData<ArcInner<ScheduledIo>>: UnsafeUnpin,
*const dyn State<ClientConnectionData> is !null: UnsafeUnpin,
PhantomData<dyn State<ClientConnectionData>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<ContentType>: UnsafeUnpin,
PhantomData<HandshakeType>: UnsafeUnpin,
&'static str: UnsafeUnpin,
*const ArcInner<dyn Error + Sync + Send> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Error + Sync + Send>>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
&'static Tls12CipherSuite: UnsafeUnpin,
&'static Tls13CipherSuite: UnsafeUnpin,
*const dyn MessageEncrypter is !null: UnsafeUnpin,
PhantomData<dyn MessageEncrypter>: UnsafeUnpin,
*const dyn MessageDecrypter is !null: UnsafeUnpin,
PhantomData<dyn MessageDecrypter>: UnsafeUnpin,
PhantomData<CertificateDer<'static>>: UnsafeUnpin,
PhantomData<Vec<u8>>: UnsafeUnpin,
PhantomData<(bool, Vec<u8>)>: UnsafeUnpin,
&'static dyn Algorithm: UnsafeUnpin,
*const () is !null: UnsafeUnpin,
PhantomData<ErrorData<CustomOwner>>: UnsafeUnpin,
PhantomData<Cmd>: UnsafeUnpin,
PhantomData<((usize, Scanned), Scan)>: UnsafeUnpin,
*const ArcInner<TransportStatus> is !null: UnsafeUnpin,
PhantomData<ArcInner<TransportStatus>>: UnsafeUnpin,
*const ArcInner<Mutex<State>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<State>>>: UnsafeUnpin,
*const ArcInner<Inner> is !null: UnsafeUnpin,
PhantomData<ArcInner<Inner>>: UnsafeUnpin,
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