Skip to main content

CatalogProvider

Trait CatalogProvider 

Source
pub trait CatalogProvider {
    // Required methods
    fn list_tables(&self) -> Vec<String>;
    fn get_table(&self, name: &str) -> CatalogResult<&dyn TableProvider>;
    fn register_table(&mut self, metadata: TableMetadata) -> CatalogResult<()>;
}
Expand description

A registry of tables that can be listed, looked up, and registered.

Required Methods§

Source

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

Return the names of all tables in the catalog.

Source

fn get_table(&self, name: &str) -> CatalogResult<&dyn TableProvider>

Look up a table by name.

Source

fn register_table(&mut self, metadata: TableMetadata) -> CatalogResult<()>

Register a table in the catalog.

Returns an error if the schema is structurally invalid or if implementation-specific constraints are violated.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§