Struct datafusion::row::accessor::RowAccessor
source · pub struct RowAccessor<'a> { /* private fields */ }
Expand description
Provides read/write/modify access to a tuple stored in Row format
at data[base_offset..]
Set / Update data
in [u8]
─ ─ ─ ─ ─ ─ ─ ┐ Read data out as native
│ types or ScalarValues
│
│ ┌───────────────────────┐
│ │
└ ▶│ [u8] │─ ─ ─ ─ ─ ─ ─ ─▶
│ │
└───────────────────────┘
Implementations§
source§impl<'a> RowAccessor<'a>
impl<'a> RowAccessor<'a>
sourcepub fn new(schema: &Schema) -> RowAccessor<'a>
pub fn new(schema: &Schema) -> RowAccessor<'a>
new
pub fn new_from_layout(layout: Arc<RowLayout>) -> RowAccessor<'a>
sourcepub fn point_to(&mut self, offset: usize, data: &'a mut [u8])
pub fn point_to(&mut self, offset: usize, data: &'a mut [u8])
Update this row to point to position offset
in base
pub fn get_bool_opt(&self, idx: usize) -> Option<bool>
pub fn get_u8_opt(&self, idx: usize) -> Option<u8>
pub fn get_u16_opt(&self, idx: usize) -> Option<u16>
pub fn get_u32_opt(&self, idx: usize) -> Option<u32>
pub fn get_u64_opt(&self, idx: usize) -> Option<u64>
pub fn get_i8_opt(&self, idx: usize) -> Option<i8>
pub fn get_i16_opt(&self, idx: usize) -> Option<i16>
pub fn get_i32_opt(&self, idx: usize) -> Option<i32>
pub fn get_i64_opt(&self, idx: usize) -> Option<i64>
pub fn get_f32_opt(&self, idx: usize) -> Option<f32>
pub fn get_f64_opt(&self, idx: usize) -> Option<f64>
pub fn get_i128_opt(&self, idx: usize) -> Option<i128>
pub fn get_bool_scalar(&self, idx: usize) -> ScalarValue
pub fn get_u8_scalar(&self, idx: usize) -> ScalarValue
pub fn get_u16_scalar(&self, idx: usize) -> ScalarValue
pub fn get_u32_scalar(&self, idx: usize) -> ScalarValue
pub fn get_u64_scalar(&self, idx: usize) -> ScalarValue
pub fn get_i8_scalar(&self, idx: usize) -> ScalarValue
pub fn get_i16_scalar(&self, idx: usize) -> ScalarValue
pub fn get_i32_scalar(&self, idx: usize) -> ScalarValue
pub fn get_i64_scalar(&self, idx: usize) -> ScalarValue
pub fn get_f32_scalar(&self, idx: usize) -> ScalarValue
pub fn get_f64_scalar(&self, idx: usize) -> ScalarValue
pub fn get_as_scalar(&self, dt: &DataType, index: usize) -> ScalarValue
sourcepub fn bitand_bool(&mut self, idx: usize, value: bool)
pub fn bitand_bool(&mut self, idx: usize, value: bool)
check bit_and then update
sourcepub fn bitand_u16(&mut self, idx: usize, value: u16)
pub fn bitand_u16(&mut self, idx: usize, value: u16)
check bit_and then update
sourcepub fn bitand_u32(&mut self, idx: usize, value: u32)
pub fn bitand_u32(&mut self, idx: usize, value: u32)
check bit_and then update
sourcepub fn bitand_u64(&mut self, idx: usize, value: u64)
pub fn bitand_u64(&mut self, idx: usize, value: u64)
check bit_and then update
sourcepub fn bitand_i16(&mut self, idx: usize, value: i16)
pub fn bitand_i16(&mut self, idx: usize, value: i16)
check bit_and then update
sourcepub fn bitand_i32(&mut self, idx: usize, value: i32)
pub fn bitand_i32(&mut self, idx: usize, value: i32)
check bit_and then update
sourcepub fn bitand_i64(&mut self, idx: usize, value: i64)
pub fn bitand_i64(&mut self, idx: usize, value: i64)
check bit_and then update
sourcepub fn bitor_bool(&mut self, idx: usize, value: bool)
pub fn bitor_bool(&mut self, idx: usize, value: bool)
check bit_and then update
sourcepub fn bitxor_u16(&mut self, idx: usize, value: u16)
pub fn bitxor_u16(&mut self, idx: usize, value: u16)
check bit_and then update
sourcepub fn bitxor_u32(&mut self, idx: usize, value: u32)
pub fn bitxor_u32(&mut self, idx: usize, value: u32)
check bit_and then update
sourcepub fn bitxor_u64(&mut self, idx: usize, value: u64)
pub fn bitxor_u64(&mut self, idx: usize, value: u64)
check bit_and then update
sourcepub fn bitxor_i16(&mut self, idx: usize, value: i16)
pub fn bitxor_i16(&mut self, idx: usize, value: i16)
check bit_and then update
sourcepub fn bitxor_i32(&mut self, idx: usize, value: i32)
pub fn bitxor_i32(&mut self, idx: usize, value: i32)
check bit_and then update
sourcepub fn bitxor_i64(&mut self, idx: usize, value: i64)
pub fn bitxor_i64(&mut self, idx: usize, value: i64)
check bit_and then update
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for RowAccessor<'a>
impl<'a> Send for RowAccessor<'a>
impl<'a> Sync for RowAccessor<'a>
impl<'a> Unpin for RowAccessor<'a>
impl<'a> !UnwindSafe for RowAccessor<'a>
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