pub trait Catalog: Send + Sync + Debug {
    // Required methods
    fn list_tables<'life0, 'life1, 'async_trait>(
        &'life0 self,
        namespace: &'life1 Namespace
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Identifier>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn list_namespaces<'life0, 'life1, 'async_trait>(
        &'life0 self,
        parent: Option<&'life1 str>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Namespace>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn table_exists<'life0, 'life1, 'async_trait>(
        &'life0 self,
        identifier: &'life1 Identifier
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn drop_table<'life0, 'life1, 'async_trait>(
        &'life0 self,
        identifier: &'life1 Identifier
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn load_tabular<'life0, 'async_trait>(
        self: Arc<Self>,
        identifier: &'life0 Identifier
    ) -> Pin<Box<dyn Future<Output = Result<Tabular, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create_table<'async_trait>(
        self: Arc<Self>,
        identifier: Identifier,
        metadata: TableMetadata
    ) -> Pin<Box<dyn Future<Output = Result<Table, Error>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn create_view<'async_trait>(
        self: Arc<Self>,
        identifier: Identifier,
        metadata: ViewMetadata
    ) -> Pin<Box<dyn Future<Output = Result<View, Error>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn create_materialized_view<'async_trait>(
        self: Arc<Self>,
        identifier: Identifier,
        metadata: MaterializedViewMetadata
    ) -> Pin<Box<dyn Future<Output = Result<MaterializedView, Error>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn update_table<'async_trait>(
        self: Arc<Self>,
        commit: CommitTable
    ) -> Pin<Box<dyn Future<Output = Result<Table, Error>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn update_view<'async_trait>(
        self: Arc<Self>,
        commit: CommitView
    ) -> Pin<Box<dyn Future<Output = Result<View, Error>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn update_materialized_view<'async_trait>(
        self: Arc<Self>,
        commit: CommitView
    ) -> Pin<Box<dyn Future<Output = Result<MaterializedView, Error>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn object_store(&self, bucket: Bucket<'_>) -> Arc<dyn ObjectStore>;
}
Expand description

Trait to create, replace and drop tables in an iceberg catalog.

Required Methods§

source

fn list_tables<'life0, 'life1, 'async_trait>( &'life0 self, namespace: &'life1 Namespace ) -> Pin<Box<dyn Future<Output = Result<Vec<Identifier>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Lists all tables in the given namespace.

source

fn list_namespaces<'life0, 'life1, 'async_trait>( &'life0 self, parent: Option<&'life1 str> ) -> Pin<Box<dyn Future<Output = Result<Vec<Namespace>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Lists all namespaces in the catalog.

source

fn table_exists<'life0, 'life1, 'async_trait>( &'life0 self, identifier: &'life1 Identifier ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create a table from an identifier and a schema Check if a table exists

source

fn drop_table<'life0, 'life1, 'async_trait>( &'life0 self, identifier: &'life1 Identifier ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Drop a table and delete all data and metadata files.

source

fn load_tabular<'life0, 'async_trait>( self: Arc<Self>, identifier: &'life0 Identifier ) -> Pin<Box<dyn Future<Output = Result<Tabular, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Load a table.

source

fn create_table<'async_trait>( self: Arc<Self>, identifier: Identifier, metadata: TableMetadata ) -> Pin<Box<dyn Future<Output = Result<Table, Error>> + Send + 'async_trait>>
where Self: 'async_trait,

Register a table with the catalog if it doesn’t exist.

source

fn create_view<'async_trait>( self: Arc<Self>, identifier: Identifier, metadata: ViewMetadata ) -> Pin<Box<dyn Future<Output = Result<View, Error>> + Send + 'async_trait>>
where Self: 'async_trait,

Register a view with the catalog if it doesn’t exist.

source

fn create_materialized_view<'async_trait>( self: Arc<Self>, identifier: Identifier, metadata: MaterializedViewMetadata ) -> Pin<Box<dyn Future<Output = Result<MaterializedView, Error>> + Send + 'async_trait>>
where Self: 'async_trait,

Register a materialized view with the catalog if it doesn’t exist.

source

fn update_table<'async_trait>( self: Arc<Self>, commit: CommitTable ) -> Pin<Box<dyn Future<Output = Result<Table, Error>> + Send + 'async_trait>>
where Self: 'async_trait,

perform commit table operation

source

fn update_view<'async_trait>( self: Arc<Self>, commit: CommitView ) -> Pin<Box<dyn Future<Output = Result<View, Error>> + Send + 'async_trait>>
where Self: 'async_trait,

perform commit view operation

source

fn update_materialized_view<'async_trait>( self: Arc<Self>, commit: CommitView ) -> Pin<Box<dyn Future<Output = Result<MaterializedView, Error>> + Send + 'async_trait>>
where Self: 'async_trait,

perform commit view operation

source

fn object_store(&self, bucket: Bucket<'_>) -> Arc<dyn ObjectStore>

Return the associated object store for a bucket

Implementors§