Trait iceberg_rust::catalog::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§
sourcefn 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 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
sourcefn 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 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
sourcefn 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 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
sourcefn 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 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
sourcefn 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 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
sourcefn 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_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.
sourcefn 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 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.
sourcefn 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 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
sourcefn 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_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.
sourcefn 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_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.
sourcefn 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 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.
sourcefn 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 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.
sourcefn 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_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.
sourcefn 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_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.
sourcefn 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 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.
sourcefn 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_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
sourcefn 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_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
sourcefn 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 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
sourcefn 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 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.
sourcefn object_store(&self, bucket: Bucket<'_>) -> Arc<dyn ObjectStore>
fn object_store(&self, bucket: Bucket<'_>) -> Arc<dyn ObjectStore>
Return the associated object store for a bucket