pub struct ClickHouseTableFactory { /* private fields */ }Expand description
A table factory for creating ClickHouse TableProviders.
Returns a federated table provider if the federation feature is enabled, otherwise a
TableProvider
Implementations§
Source§impl ClickHouseTableFactory
impl ClickHouseTableFactory
pub fn new(pool: Arc<ClickHouseConnectionPool>) -> Self
Sourcepub fn pool(&self) -> &Arc<ClickHouseConnectionPool>
pub fn pool(&self) -> &Arc<ClickHouseConnectionPool>
Get a reference to the connection pool.
Sourcepub fn with_coercion(self, coerce_schema: bool) -> Self
pub fn with_coercion(self, coerce_schema: bool) -> Self
Set whether to coerce the schema of the table provider.
Sourcepub async fn table_provider(
&self,
table_reference: TableReference,
) -> Result<Arc<dyn TableProvider + 'static>>
pub async fn table_provider( &self, table_reference: TableReference, ) -> Result<Arc<dyn TableProvider + 'static>>
§Errors
- Returns an error if the table provider cannot be created.
Sourcepub fn table_provider_from_schema(
&self,
table_reference: TableReference,
schema: SchemaRef,
) -> Arc<dyn TableProvider + 'static>
pub fn table_provider_from_schema( &self, table_reference: TableReference, schema: SchemaRef, ) -> Arc<dyn TableProvider + 'static>
Create a table provider from a schema.
§Errors
- Returns an error only in the federation feature path, if federating fails.
Trait Implementations§
Source§impl Clone for ClickHouseTableFactory
impl Clone for ClickHouseTableFactory
Source§fn clone(&self) -> ClickHouseTableFactory
fn clone(&self) -> ClickHouseTableFactory
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ClickHouseTableFactory
impl !RefUnwindSafe for ClickHouseTableFactory
impl Send for ClickHouseTableFactory
impl Sync for ClickHouseTableFactory
impl Unpin for ClickHouseTableFactory
impl !UnwindSafe for ClickHouseTableFactory
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more