iceberg_rust::catalog

Trait Catalog

Source
pub trait Catalog:
    Send
    + Sync
    + Debug {
Show 21 methods // Required methods fn name(&self) -> &str; fn create_namespace<'life0, 'life1, 'async_trait>( &'life0 self, namespace: &'life1 Namespace, properties: Option<HashMap<String, String>>, ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, String>, Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn drop_namespace<'life0, 'life1, 'async_trait>( &'life0 self, namespace: &'life1 Namespace, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn load_namespace<'life0, 'life1, 'async_trait>( &'life0 self, namespace: &'life1 Namespace, ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, String>, Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn update_namespace<'life0, 'life1, 'async_trait>( &'life0 self, namespace: &'life1 Namespace, updates: Option<HashMap<String, String>>, removals: Option<Vec<String>>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn namespace_exists<'life0, 'life1, 'async_trait>( &'life0 self, namespace: &'life1 Namespace, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_tabulars<'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 tabular_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 drop_view<'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 drop_materialized_view<'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, create_table: CreateTable, ) -> 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, create_view: CreateView<Option<()>>, ) -> 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, create_view: CreateMaterializedView, ) -> 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<Option<()>>, ) -> 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<FullIdentifier>, ) -> Pin<Box<dyn Future<Output = Result<MaterializedView, Error>> + Send + 'async_trait>> where Self: 'async_trait; fn register_table<'life0, 'async_trait>( self: Arc<Self>, identifier: Identifier, metadata_location: &'life0 str, ) -> Pin<Box<dyn Future<Output = Result<Table, Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: '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 name(&self) -> &str

Name of the catalog

Source

fn create_namespace<'life0, 'life1, 'async_trait>( &'life0 self, namespace: &'life1 Namespace, properties: Option<HashMap<String, String>>, ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, String>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create a namespace in the catalog

Source

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

Drop a namespace in the catalog

Source

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

Load the namespace properties from the catalog

Source

fn update_namespace<'life0, 'life1, 'async_trait>( &'life0 self, namespace: &'life1 Namespace, updates: Option<HashMap<String, String>>, removals: Option<Vec<String>>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update the namespace properties in the catalog

Source

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

Check if a namespace exists

Source

fn list_tabulars<'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 tabular_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,

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 drop_view<'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 drop_materialized_view<'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, create_table: CreateTable, ) -> Pin<Box<dyn Future<Output = Result<Table, Error>> + Send + 'async_trait>>
where Self: 'async_trait,

Create a table in the catalog if it doesn’t exist.

Source

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

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

Source

fn create_materialized_view<'async_trait>( self: Arc<Self>, identifier: Identifier, create_view: CreateMaterializedView, ) -> 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<Option<()>>, ) -> 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<FullIdentifier>, ) -> Pin<Box<dyn Future<Output = Result<MaterializedView, Error>> + Send + 'async_trait>>
where Self: 'async_trait,

perform commit view operation

Source

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

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

Source

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

Return the associated object store for a bucket

Implementors§