pub struct RestSessionCatalog { /* private fields */ }Expand description
REST catalog implementation of [SessionCatalog].
Each operation accepts a [SessionContext]. REST configuration, authentication sessions,
and the HTTP client are initialized lazily once per catalog and shared across all operations.
Trait Implementations§
Source§impl Debug for RestSessionCatalog
impl Debug for RestSessionCatalog
Source§impl SessionCatalog for RestSessionCatalog
All requests and expected responses are derived from the REST catalog API spec:
https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml
impl SessionCatalog for RestSessionCatalog
All requests and expected responses are derived from the REST catalog API spec: https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml
Source§fn create_table<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 SessionContext,
namespace: &'life2 NamespaceIdent,
creation: TableCreation,
) -> Pin<Box<dyn Future<Output = Result<Table>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn create_table<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 SessionContext,
namespace: &'life2 NamespaceIdent,
creation: TableCreation,
) -> Pin<Box<dyn Future<Output = Result<Table>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create a new table inside the namespace.
In the resulting table, if there are any config properties that
are present in both the response from the REST server and the
config provided when creating this RestSessionCatalog instance, then
the value provided locally to the RestSessionCatalog will take precedence.
Source§fn load_table<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 SessionContext,
table_ident: &'life2 TableIdent,
) -> Pin<Box<dyn Future<Output = Result<Table>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn load_table<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 SessionContext,
table_ident: &'life2 TableIdent,
) -> Pin<Box<dyn Future<Output = Result<Table>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Load table from the catalog.
If there are any config properties that are present in both the response from the REST
server and the config provided when creating this RestSessionCatalog instance, then the
value provided locally to the RestSessionCatalog will take precedence.
Source§fn drop_table<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 SessionContext,
table: &'life2 TableIdent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn drop_table<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 SessionContext,
table: &'life2 TableIdent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Drop a table from the catalog.
Source§fn purge_table<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 SessionContext,
table: &'life2 TableIdent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn purge_table<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 SessionContext,
table: &'life2 TableIdent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Drop a table from the catalog and purge its data by sending
purgeRequested=true to the REST server.
Source§fn table_exists<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 SessionContext,
table: &'life2 TableIdent,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn table_exists<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 SessionContext,
table: &'life2 TableIdent,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Check if a table exists in the catalog.
Source§fn rename_table<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_context: &'life1 SessionContext,
src: &'life2 TableIdent,
dest: &'life3 TableIdent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn rename_table<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_context: &'life1 SessionContext,
src: &'life2 TableIdent,
dest: &'life3 TableIdent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Rename a table in the catalog.
Source§fn list_namespaces<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 SessionContext,
parent: Option<&'life2 NamespaceIdent>,
) -> Pin<Box<dyn Future<Output = Result<Vec<NamespaceIdent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_namespaces<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 SessionContext,
parent: Option<&'life2 NamespaceIdent>,
) -> Pin<Box<dyn Future<Output = Result<Vec<NamespaceIdent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn create_namespace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 SessionContext,
namespace: &'life2 NamespaceIdent,
properties: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Namespace>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn create_namespace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 SessionContext,
namespace: &'life2 NamespaceIdent,
properties: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Namespace>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn get_namespace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 SessionContext,
namespace: &'life2 NamespaceIdent,
) -> Pin<Box<dyn Future<Output = Result<Namespace>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_namespace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 SessionContext,
namespace: &'life2 NamespaceIdent,
) -> Pin<Box<dyn Future<Output = Result<Namespace>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn namespace_exists<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 SessionContext,
ns: &'life2 NamespaceIdent,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn namespace_exists<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 SessionContext,
ns: &'life2 NamespaceIdent,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn update_namespace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 SessionContext,
_namespace: &'life2 NamespaceIdent,
_properties: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_namespace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 SessionContext,
_namespace: &'life2 NamespaceIdent,
_properties: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn drop_namespace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 SessionContext,
namespace: &'life2 NamespaceIdent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn drop_namespace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 SessionContext,
namespace: &'life2 NamespaceIdent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn list_tables<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 SessionContext,
namespace: &'life2 NamespaceIdent,
) -> Pin<Box<dyn Future<Output = Result<Vec<TableIdent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_tables<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 SessionContext,
namespace: &'life2 NamespaceIdent,
) -> Pin<Box<dyn Future<Output = Result<Vec<TableIdent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn register_table<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 SessionContext,
table_ident: &'life2 TableIdent,
metadata_location: String,
) -> Pin<Box<dyn Future<Output = Result<Table>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn register_table<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 SessionContext,
table_ident: &'life2 TableIdent,
metadata_location: String,
) -> Pin<Box<dyn Future<Output = Result<Table>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Auto Trait Implementations§
impl !Freeze for RestSessionCatalog
impl !RefUnwindSafe for RestSessionCatalog
impl Send for RestSessionCatalog
impl Sync for RestSessionCatalog
impl Unpin for RestSessionCatalog
impl UnsafeUnpin for RestSessionCatalog
impl !UnwindSafe for RestSessionCatalog
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more