pub struct ClickHouseSource { /* private fields */ }Expand description
A handle to a ClickHouse server queried over HTTP.
ⓘ
let ch = ClickHouseSource::new("http://localhost:8123")
.database("analytics")
.credentials("default", "");
let batches = ch.query_arrow("SELECT count() FROM events", &[]).await?;Implementations§
Trait Implementations§
Source§impl RemoteSink for ClickHouseSource
impl RemoteSink for ClickHouseSource
Source§fn write_arrow<'life0, 'life1, 'async_trait>(
&'life0 self,
table: &'life1 str,
batches: Vec<RecordBatch>,
) -> Pin<Box<dyn Future<Output = Result<(), DbkitError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write_arrow<'life0, 'life1, 'async_trait>(
&'life0 self,
table: &'life1 str,
batches: Vec<RecordBatch>,
) -> Pin<Box<dyn Future<Output = Result<(), DbkitError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Append Arrow batches to
table in the remote store. The table is
expected to already exist with a compatible schema. Empty input is a
no-op.Source§impl RemoteSource for ClickHouseSource
impl RemoteSource for ClickHouseSource
Source§fn query_arrow<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [DbValue],
) -> Pin<Box<dyn Future<Output = Result<Vec<RecordBatch>, DbkitError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn query_arrow<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [DbValue],
) -> Pin<Box<dyn Future<Output = Result<Vec<RecordBatch>, DbkitError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Run an analytical query against the remote store, returning Arrow batches. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ClickHouseSource
impl !UnwindSafe for ClickHouseSource
impl Freeze for ClickHouseSource
impl Send for ClickHouseSource
impl Sync for ClickHouseSource
impl Unpin for ClickHouseSource
impl UnsafeUnpin for ClickHouseSource
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<S> RemoteSinkExt for Swhere
S: RemoteSink + ?Sized,
impl<S> RemoteSinkExt for Swhere
S: RemoteSink + ?Sized,
Source§impl<S> RemoteSourceExt for Swhere
S: RemoteSource + ?Sized,
impl<S> RemoteSourceExt for Swhere
S: RemoteSource + ?Sized,
Source§fn query_as<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [DbValue],
) -> Pin<Box<dyn Future<Output = Result<Vec<T>, DbkitError>> + Send + 'async_trait>>where
T: DeserializeOwned + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn query_as<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [DbValue],
) -> Pin<Box<dyn Future<Output = Result<Vec<T>, DbkitError>> + Send + 'async_trait>>where
T: DeserializeOwned + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Run a query and deserialize each row into
T (via serde_arrow).