Struct datafusion::catalog::catalog::MemoryCatalogProvider
source · pub struct MemoryCatalogProvider { /* private fields */ }
Expand description
Simple in-memory implementation of a catalog.
Implementations§
Trait Implementations§
source§impl CatalogProvider for MemoryCatalogProvider
impl CatalogProvider for MemoryCatalogProvider
source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Returns the catalog provider as
Any
so that it can be downcast to a specific implementation.source§fn schema_names(&self) -> Vec<String>
fn schema_names(&self) -> Vec<String>
Retrieves the list of available schema names in this catalog.
source§fn schema(&self, name: &str) -> Option<Arc<dyn SchemaProvider>>
fn schema(&self, name: &str) -> Option<Arc<dyn SchemaProvider>>
Retrieves a specific schema from the catalog by name, provided it exists.
source§fn register_schema(
&self,
name: &str,
schema: Arc<dyn SchemaProvider>
) -> Result<Option<Arc<dyn SchemaProvider>>>
fn register_schema( &self, name: &str, schema: Arc<dyn SchemaProvider> ) -> Result<Option<Arc<dyn SchemaProvider>>>
Adds a new schema to this catalog. Read more
source§fn deregister_schema(
&self,
name: &str,
cascade: bool
) -> Result<Option<Arc<dyn SchemaProvider>>>
fn deregister_schema( &self, name: &str, cascade: bool ) -> Result<Option<Arc<dyn SchemaProvider>>>
Removes a schema from this catalog. Implementations of this method should return
errors if the schema exists but cannot be dropped. For example, in DataFusion’s
default in-memory catalog,
MemoryCatalogProvider
, a non-empty schema
will only be successfully dropped when cascade
is true.
This is equivalent to how DROP SCHEMA works in PostgreSQL. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for MemoryCatalogProvider
impl Send for MemoryCatalogProvider
impl Sync for MemoryCatalogProvider
impl Unpin for MemoryCatalogProvider
impl !UnwindSafe for MemoryCatalogProvider
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