Struct iceberg_rust::table::Table
source · pub struct Table { /* private fields */ }
Expand description
Iceberg table
Implementations§
source§impl Table
impl Table
Public interface of the table.
sourcepub fn builder() -> CreateTableBuilder
pub fn builder() -> CreateTableBuilder
Build a new table
sourcepub async fn new(
identifier: Identifier,
catalog: Arc<dyn Catalog>,
metadata: TableMetadata,
) -> Result<Self, Error>
pub async fn new( identifier: Identifier, catalog: Arc<dyn Catalog>, metadata: TableMetadata, ) -> Result<Self, Error>
Create a new metastore Table
sourcepub fn identifier(&self) -> &Identifier
pub fn identifier(&self) -> &Identifier
Get the table identifier in the catalog. Returns None of it is a filesystem table.
sourcepub fn catalog(&self) -> Arc<dyn Catalog>
pub fn catalog(&self) -> Arc<dyn Catalog>
Get the catalog associated to the table. Returns None if the table is a filesystem table
sourcepub fn object_store(&self) -> Arc<dyn ObjectStore>
pub fn object_store(&self) -> Arc<dyn ObjectStore>
Get the object_store associated to the table
sourcepub fn current_schema(&self, branch: Option<&str>) -> Result<&Schema, Error>
pub fn current_schema(&self, branch: Option<&str>) -> Result<&Schema, Error>
Get the schema of the table for a given branch. Defaults to main.
sourcepub fn metadata(&self) -> &TableMetadata
pub fn metadata(&self) -> &TableMetadata
Get the metadata of the table
sourcepub fn into_metadata(self) -> TableMetadata
pub fn into_metadata(self) -> TableMetadata
Get the metadata of the table
sourcepub async fn manifests(
&self,
start: Option<i64>,
end: Option<i64>,
) -> Result<Vec<ManifestListEntry>, Error>
pub async fn manifests( &self, start: Option<i64>, end: Option<i64>, ) -> Result<Vec<ManifestListEntry>, Error>
Get list of current manifest files within an optional snapshot range. The start snapshot is excluded from the range.
sourcepub async fn datafiles(
&self,
manifests: &[ManifestListEntry],
filter: Option<Vec<bool>>,
) -> Result<Vec<ManifestEntry>, Error>
pub async fn datafiles( &self, manifests: &[ManifestListEntry], filter: Option<Vec<bool>>, ) -> Result<Vec<ManifestEntry>, Error>
Get list of datafiles corresponding to the given manifest files
sourcepub async fn datafiles_contains_delete(
&self,
start: Option<i64>,
end: Option<i64>,
) -> Result<bool, Error>
pub async fn datafiles_contains_delete( &self, start: Option<i64>, end: Option<i64>, ) -> Result<bool, Error>
Check if datafiles contain deletes
sourcepub fn new_transaction(&mut self, branch: Option<&str>) -> TableTransaction<'_>
pub fn new_transaction(&mut self, branch: Option<&str>) -> TableTransaction<'_>
Create a new transaction for this table
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Table
impl !RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl !UnwindSafe for Table
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
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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>
Converts
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>
Converts
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