Trait datafusion_catalog::CatalogProviderList

source ·
pub trait CatalogProviderList: Sync + Send {
    // Required methods
    fn as_any(&self) -> &dyn Any;
    fn register_catalog(
        &self,
        name: String,
        catalog: Arc<dyn CatalogProvider>,
    ) -> Option<Arc<dyn CatalogProvider>>;
    fn catalog_names(&self) -> Vec<String>;
    fn catalog(&self, name: &str) -> Option<Arc<dyn CatalogProvider>>;
}
Expand description

Represent a list of named CatalogProviders.

Please see the documentation on CatalogProvider for details of implementing a custom catalog.

Required Methods§

source

fn as_any(&self) -> &dyn Any

Returns the catalog list as Any so that it can be downcast to a specific implementation.

source

fn register_catalog( &self, name: String, catalog: Arc<dyn CatalogProvider>, ) -> Option<Arc<dyn CatalogProvider>>

Adds a new catalog to this catalog list If a catalog of the same name existed before, it is replaced in the list and returned.

source

fn catalog_names(&self) -> Vec<String>

Retrieves the list of available catalog names

source

fn catalog(&self, name: &str) -> Option<Arc<dyn CatalogProvider>>

Retrieves a specific catalog by name, provided it exists.

Implementors§