Struct dbkit_engine::table::Table
[−]
[src]
pub struct Table<'alloc> {
// some fields omitted
}Abstraction on top of a Block for easy construction and modification of contained data.
The container assumes that all operations on the block are safe and schema type conforming. In case of errors it simply panics.
Methods
impl<'alloc> Table<'alloc>[src]
fn new(alloc: &'alloc Allocator, schema: &Schema, capacity: Option<RowOffset>) -> Table<'alloc>
fn add_row(&mut self) -> Result<RowOffset, DBError>
Add a single row.
fn block_ref(&self) -> &'alloc Block
fn block_ref_mut(&mut self) -> &'alloc mut Block
fn take(&mut self) -> Option<Block<'alloc>>
Take ownership of the contained Block.
This is done when the Table is complete and is going to be used elsewhere.
fn column_mut(&mut self, pos: usize) -> Option<&mut Column<'alloc>>
Get a mutable reference to the Table/Block column.
panics on out of bounds column
fn set_null(&mut self, col: usize, row: RowOffset, value: bool) -> Result<(), DBError>
Set nul value for (col, row) in the currently allocated table space.
fn set<T: ValueSetter>(&mut self, col: usize, row: RowOffset, value: T) -> Result<(), DBError>
Set value for (col, row) in the currently allocated table space.