Struct iceberg_rust::table::transaction::TableTransaction
source · pub struct TableTransaction<'table> { /* private fields */ }
Expand description
Transactions let you perform a sequence of [Operation]s that can be committed to be performed with ACID guarantees.
Implementations§
source§impl<'table> TableTransaction<'table>
impl<'table> TableTransaction<'table>
sourcepub fn new(table: &'table mut Table, branch: Option<&str>) -> Self
pub fn new(table: &'table mut Table, branch: Option<&str>) -> Self
Create a transaction for the given table.
sourcepub fn add_schema(self, schema: Schema) -> Self
pub fn add_schema(self, schema: Schema) -> Self
Update the schmema of the table
sourcepub fn set_default_spec(self, spec_id: i32) -> Self
pub fn set_default_spec(self, spec_id: i32) -> Self
Update the spec of the table
sourcepub fn rewrite_with_lineage(
self,
files: Vec<DataFile>,
lineage: Vec<SourceTable>
) -> Self
pub fn rewrite_with_lineage( self, files: Vec<DataFile>, lineage: Vec<SourceTable> ) -> Self
Quickly append files to the table
sourcepub fn update_properties(self, entries: Vec<(String, String)>) -> Self
pub fn update_properties(self, entries: Vec<(String, String)>) -> Self
Update the properties of the table
sourcepub fn set_snapshot_ref(self, entry: (String, SnapshotReference)) -> Self
pub fn set_snapshot_ref(self, entry: (String, SnapshotReference)) -> Self
Set snapshot reference
Auto Trait Implementations§
impl<'table> Freeze for TableTransaction<'table>
impl<'table> !RefUnwindSafe for TableTransaction<'table>
impl<'table> Send for TableTransaction<'table>
impl<'table> Sync for TableTransaction<'table>
impl<'table> Unpin for TableTransaction<'table>
impl<'table> !UnwindSafe for TableTransaction<'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