pub struct VoltTable { /* private fields */ }Implementations§
Source§impl VoltTable
impl VoltTable
pub fn get_i8_by_column( &mut self, column: &str, ) -> Result<Option<i8>, VoltError>
pub fn get_i8_by_idx(&mut self, column: i16) -> Result<Option<i8>, VoltError>
pub fn get_u8_by_column( &mut self, column: &str, ) -> Result<Option<u8>, VoltError>
pub fn get_u8_by_idx(&mut self, column: i16) -> Result<Option<u8>, VoltError>
pub fn get_i16_by_column( &mut self, column: &str, ) -> Result<Option<i16>, VoltError>
pub fn get_i16_by_idx(&mut self, column: i16) -> Result<Option<i16>, VoltError>
pub fn get_u16_by_column( &mut self, column: &str, ) -> Result<Option<u16>, VoltError>
pub fn get_u16_by_idx(&mut self, column: i16) -> Result<Option<u16>, VoltError>
pub fn get_i32_by_column( &mut self, column: &str, ) -> Result<Option<i32>, VoltError>
pub fn get_i32_by_idx(&mut self, column: i16) -> Result<Option<i32>, VoltError>
pub fn get_u32_by_column( &mut self, column: &str, ) -> Result<Option<u32>, VoltError>
pub fn get_u32_by_idx(&mut self, column: i16) -> Result<Option<u32>, VoltError>
pub fn get_i64_by_column( &mut self, column: &str, ) -> Result<Option<i64>, VoltError>
pub fn get_i64_by_idx(&mut self, column: i16) -> Result<Option<i64>, VoltError>
pub fn get_u64_by_column( &mut self, column: &str, ) -> Result<Option<u64>, VoltError>
pub fn get_u64_by_idx(&mut self, column: i16) -> Result<Option<u64>, VoltError>
pub fn get_f32_by_column( &mut self, column: &str, ) -> Result<Option<f32>, VoltError>
pub fn get_f32_by_idx(&mut self, column: i16) -> Result<Option<f32>, VoltError>
pub fn get_f64_by_column( &mut self, column: &str, ) -> Result<Option<f64>, VoltError>
pub fn get_f64_by_idx(&mut self, column: i16) -> Result<Option<f64>, VoltError>
Source§impl VoltTable
impl VoltTable
Sourcepub fn new_table(types: Vec<i8>, header: Vec<String>) -> Self
pub fn new_table(types: Vec<i8>, header: Vec<String>) -> Self
COLUMN HEADER: [int: column header size in bytes (non-inclusive)] [byte: table status code] [short: num columns] [byte: column type] * num columns [string: column name] * num columns TABLE BODY DATA: [int: num tuples] [int: row size (non inclusive), blob row data] * num tuples Create a new VoltTable with the given column types and headers.
§Panics
Panics if the length of types and header vectors don’t match.
pub fn new_voltdb_table(columns: Vec<Column>) -> Self
pub fn get_column_index(&mut self, column: &str) -> Result<i16, VoltError>
pub fn map_row<'a, T: From<&'a mut VoltTable>>(&'a mut self) -> T
pub fn take<T: Value>(&mut self, column: i16) -> Result<T, VoltError>
pub fn fetch<T: Value>(&mut self, column: &str) -> Result<T, VoltError>
pub fn debug_row(&mut self) -> String
pub fn has_error(&mut self) -> Option<VoltError>
pub fn advance_row(&mut self) -> bool
pub fn columns(&self) -> Vec<Column>
pub fn col_length( r: &mut ByteBuffer, offset: i32, col_type: i8, ) -> Result<i32, VoltError>
pub fn get_value_by_column( &mut self, column: &str, ) -> Result<Option<Box<dyn Value>>, VoltError>
pub fn get_value_by_idx( &mut self, column: i16, ) -> Result<Option<Box<dyn Value>>, VoltError>
pub fn get_bool_by_column( &mut self, column: &str, ) -> Result<Option<bool>, VoltError>
pub fn get_bool_by_idx( &mut self, column: i16, ) -> Result<Option<bool>, VoltError>
pub fn get_bytes_op_by_column( &mut self, column: &str, ) -> Result<Option<Vec<u8>>, VoltError>
pub fn get_bytes_op_by_idx( &mut self, column: i16, ) -> Result<Option<Vec<u8>>, VoltError>
pub fn get_bytes_by_column( &mut self, column: &str, ) -> Result<Vec<u8>, VoltError>
pub fn get_decimal_by_column( &mut self, column: &str, ) -> Result<Option<BigDecimal>, VoltError>
pub fn get_decimal_by_idx( &mut self, column: i16, ) -> Result<Option<BigDecimal>, VoltError>
pub fn get_string_by_column( &mut self, column: &str, ) -> Result<Option<String>, VoltError>
pub fn get_column_by_index(&self, column: i16) -> Result<&Column, VoltError>
pub fn get_string_by_idx( &mut self, column: i16, ) -> Result<Option<String>, VoltError>
pub fn get_time_by_column( &mut self, column: &str, ) -> Result<Option<DateTime<Utc>>, VoltError>
pub fn get_time_by_idx( &mut self, column: i16, ) -> Result<Option<DateTime<Utc>>, VoltError>
pub fn get_bytes_by_idx( &mut self, column_index: i16, ) -> Result<Vec<u8>, VoltError>
pub fn advance_to_row(&mut self, row_index: i32) -> bool
Trait Implementations§
Source§impl Value for VoltTable
impl Value for VoltTable
fn get_write_length(&self) -> i32
fn marshal(&self, bytebuffer: &mut ByteBuffer)
fn marshal_in_table(&self, _bytebuffer: &mut ByteBuffer, _column_type: i8)
fn to_value_string(&self) -> String
fn from_bytes(_bs: Vec<u8>, _column: &Column) -> Result<Self, VoltError>where
Self: Sized,
Auto Trait Implementations§
impl Freeze for VoltTable
impl RefUnwindSafe for VoltTable
impl Send for VoltTable
impl Sync for VoltTable
impl Unpin for VoltTable
impl UnsafeUnpin for VoltTable
impl UnwindSafe for VoltTable
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