pub struct OpenSearchTableFactory { /* private fields */ }Expand description
Builds OpenSearchTableProviders over one cluster, deriving each table’s schema from the
index _mapping unless one is declared.
Implementations§
Source§impl OpenSearchTableFactory
impl OpenSearchTableFactory
pub fn new(client: OpenSearchClient) -> Self
Sourcepub fn client(&self) -> &OpenSearchClient
pub fn client(&self) -> &OpenSearchClient
The client every table built here shares.
Sourcepub async fn table_provider(
&self,
index: impl Into<String>,
) -> Result<Arc<dyn TableProvider>>
pub async fn table_provider( &self, index: impl Into<String>, ) -> Result<Arc<dyn TableProvider>>
A table over index whose schema is derived from its _mapping
(schema_from_mapping). Fails if the index does not exist or has no properties.
Sourcepub async fn provider(
&self,
index: impl Into<String>,
) -> Result<OpenSearchTableProvider>
pub async fn provider( &self, index: impl Into<String>, ) -> Result<OpenSearchTableProvider>
Like table_provider, not type-erased, for the builder methods.
Sourcepub fn table_provider_with_schema(
&self,
index: impl Into<String>,
schema: SchemaRef,
) -> Arc<dyn TableProvider> ⓘ
pub fn table_provider_with_schema( &self, index: impl Into<String>, schema: SchemaRef, ) -> Arc<dyn TableProvider> ⓘ
A table over index with a declared schema (no _mapping round-trip; only the listed
columns are read, and a not-yet-created index reads as empty).
Sourcepub fn provider_with_schema(
&self,
index: impl Into<String>,
schema: SchemaRef,
) -> OpenSearchTableProvider
pub fn provider_with_schema( &self, index: impl Into<String>, schema: SchemaRef, ) -> OpenSearchTableProvider
The provider (not type-erased), for callers that want the builder methods.
Trait Implementations§
Source§impl Clone for OpenSearchTableFactory
impl Clone for OpenSearchTableFactory
Source§fn clone(&self) -> OpenSearchTableFactory
fn clone(&self) -> OpenSearchTableFactory
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 !RefUnwindSafe for OpenSearchTableFactory
impl !UnwindSafe for OpenSearchTableFactory
impl Freeze for OpenSearchTableFactory
impl Send for OpenSearchTableFactory
impl Sync for OpenSearchTableFactory
impl Unpin for OpenSearchTableFactory
impl UnsafeUnpin for OpenSearchTableFactory
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> 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