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