Struct iceberg_catalog_glue::GlueCatalog
source · pub struct GlueCatalog { /* private fields */ }
Expand description
Glue Catalog
Implementations§
source§impl GlueCatalog
impl GlueCatalog
Trait Implementations§
source§impl Catalog for GlueCatalog
impl Catalog for GlueCatalog
source§fn list_namespaces<'life0, 'life1, 'async_trait>(
&'life0 self,
parent: Option<&'life1 NamespaceIdent>,
) -> Pin<Box<dyn Future<Output = Result<Vec<NamespaceIdent>>> + 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 NamespaceIdent>,
) -> Pin<Box<dyn Future<Output = Result<Vec<NamespaceIdent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List namespaces from glue catalog.
Glue doesn’t support nested namespaces. We will return an empty list if parent is some.
source§fn create_namespace<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 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,
fn create_namespace<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 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,
Creates a new namespace with the given identifier and properties.
Attempts to create a namespace defined by the namespace
parameter and configured with the specified properties
.
This function can return an error in the following situations:
- Errors from
validate_namespace
if the namespace identifier does not meet validation criteria. - Errors from
convert_to_database
if the properties cannot be
successfully converted into a database configuration. - Errors from the underlying database creation process, converted using
from_sdk_error
.
source§fn get_namespace<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceIdent,
) -> Pin<Box<dyn Future<Output = Result<Namespace>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_namespace<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceIdent,
) -> Pin<Box<dyn Future<Output = Result<Namespace>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieves a namespace by its identifier.
Validates the given namespace identifier and then queries the
underlying database client to fetch the corresponding namespace data.
Constructs a Namespace
object with the retrieved data and returns it.
This function can return an error in any of the following situations:
- If the provided namespace identifier fails validation checks
- If there is an error querying the database, returned by
from_sdk_error
.
source§fn namespace_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceIdent,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn namespace_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceIdent,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Checks if a namespace exists within the Glue Catalog.
Validates the namespace identifier by querying the Glue Catalog to determine if the specified namespace (database) exists.
§Returns
A Result<bool>
indicating the outcome of the check:
Ok(true)
if the namespace exists.Ok(false)
if the namespace does not exist, identified by a specificEntityNotFoundException
variant.Err(...)
if an error occurs during validation or the Glue Catalog query, with the error encapsulating the issue.
source§fn update_namespace<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceIdent,
properties: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_namespace<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceIdent,
properties: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Asynchronously updates properties of an existing namespace.
Converts the given namespace identifier and properties into a database
representation and then attempts to update the corresponding namespace
in the Glue Catalog.
§Returns
Returns Ok(())
if the namespace update is successful. If the
namespace cannot be updated due to missing information or an error
during the update process, an Err(...)
is returned.
source§fn drop_namespace<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceIdent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn drop_namespace<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceIdent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Asynchronously drops a namespace from the Glue Catalog.
Checks if the namespace is empty. If it still contains tables the namespace will not be dropped, but an error is returned instead.
§Returns
A Result<()>
indicating the outcome:
Ok(())
signifies successful namespace deletion.Err(...)
signifies failure to drop the namespace due to validation
errors, connectivity issues, or Glue Catalog constraints.
source§fn list_tables<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceIdent,
) -> Pin<Box<dyn Future<Output = Result<Vec<TableIdent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_tables<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceIdent,
) -> Pin<Box<dyn Future<Output = Result<Vec<TableIdent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Asynchronously lists all tables within a specified namespace.
§Returns
A Result<Vec<TableIdent>>
, which is:
Ok(vec![...])
containing a vector ofTableIdent
instances, each representing a table within the specified namespace.Err(...)
if an error occurs during namespace validation or while
querying the database.
source§fn create_table<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceIdent,
creation: TableCreation,
) -> Pin<Box<dyn Future<Output = Result<Table>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_table<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 NamespaceIdent,
creation: TableCreation,
) -> Pin<Box<dyn Future<Output = Result<Table>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Creates a new table within a specified namespace using the provided table creation settings.
§Returns
A Result
wrapping a Table
object representing the newly created
table.
§Errors
This function may return an error in several cases, including invalid namespace identifiers, failure to determine a default storage location, issues generating or writing table metadata, and errors communicating with the Glue Catalog.
source§fn load_table<'life0, 'life1, 'async_trait>(
&'life0 self,
table: &'life1 TableIdent,
) -> Pin<Box<dyn Future<Output = Result<Table>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_table<'life0, 'life1, 'async_trait>(
&'life0 self,
table: &'life1 TableIdent,
) -> Pin<Box<dyn Future<Output = Result<Table>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads a table from the Glue Catalog and constructs a Table
object
based on its metadata.
§Returns
A Result
wrapping a Table
object that represents the loaded table.
§Errors
This function may return an error in several scenarios, including:
- Failure to validate the namespace.
- Failure to retrieve the table from the Glue Catalog.
- Absence of metadata location information in the table’s properties.
- Issues reading or deserializing the table’s metadata file.
source§fn drop_table<'life0, 'life1, 'async_trait>(
&'life0 self,
table: &'life1 TableIdent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn drop_table<'life0, 'life1, 'async_trait>(
&'life0 self,
table: &'life1 TableIdent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Asynchronously drops a table from the database.
§Errors
Returns an error if:
- The namespace provided in
table
cannot be validated or does not exist. - The underlying database client encounters an error while attempting to drop the table. This includes scenarios where the table does not exist.
- Any network or communication error occurs with the database backend.
source§fn table_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
table: &'life1 TableIdent,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn table_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
table: &'life1 TableIdent,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Asynchronously checks the existence of a specified table in the database.
§Returns
Ok(true)
if the table exists in the database.Ok(false)
if the table does not exist in the database.Err(...)
if an error occurs during the process
source§fn rename_table<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
src: &'life1 TableIdent,
dest: &'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 rename_table<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
src: &'life1 TableIdent,
dest: &'life2 TableIdent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Asynchronously renames a table within the database or moves it between namespaces (databases).
§Returns
Ok(())
on successful rename or move of the table.Err(...)
if an error occurs during the process.
source§fn update_table<'life0, 'async_trait>(
&'life0 self,
_commit: TableCommit,
) -> Pin<Box<dyn Future<Output = Result<Table>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_table<'life0, 'async_trait>(
&'life0 self,
_commit: TableCommit,
) -> Pin<Box<dyn Future<Output = Result<Table>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for GlueCatalog
impl !RefUnwindSafe for GlueCatalog
impl Send for GlueCatalog
impl Sync for GlueCatalog
impl Unpin for GlueCatalog
impl !UnwindSafe for GlueCatalog
Blanket Implementations§
source§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> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§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§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.