pub trait GetData<'a> {
Show 14 methods
// Provided methods
fn get_bool(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<bool>> { ... }
fn get_byte(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<i8>> { ... }
fn get_short(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<i16>> { ... }
fn get_int(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<i32>> { ... }
fn get_long(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<i64>> { ... }
fn get_float(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<f32>> { ... }
fn get_double(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<f64>> { ... }
fn get_date(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<i32>> { ... }
fn get_timestamp(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<i64>> { ... }
fn get_decimal(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<i128>> { ... }
fn get_str(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<&'a str>> { ... }
fn get_binary(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<&'a [u8]>> { ... }
fn get_list(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<ListItem<'a>>> { ... }
fn get_map(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<MapItem<'a>>> { ... }
}Expand description
When calling back into a RowVisitor, the engine needs to provide a slice of items that
implement this trait. This allows type_safe extraction from the raw data by the kernel. By
default all these methods will return an Error that an incorrect type has been asked
for. Therefore, for each “data container” an Engine has, it is only necessary to implement the
get_x method for the type it holds.
Provided Methods§
fn get_bool( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<bool>>
fn get_byte( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<i8>>
fn get_short( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<i16>>
fn get_int( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<i32>>
fn get_long( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<i64>>
fn get_float( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<f32>>
fn get_double( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<f64>>
fn get_date( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<i32>>
fn get_timestamp( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<i64>>
fn get_decimal( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<i128>>
fn get_str( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<&'a str>>
fn get_binary( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<&'a [u8]>>
fn get_list( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<ListItem<'a>>>
fn get_map( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<MapItem<'a>>>
Trait Implementations§
Source§impl<'a> TypedGetData<'a, &'a [u8]> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, &'a [u8]> for dyn GetData<'a> + '_
Source§impl<'a> TypedGetData<'a, &'a str> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, &'a str> for dyn GetData<'a> + '_
Source§impl<'a> TypedGetData<'a, HashMap<String, String>> for dyn GetData<'a> + '_
Provide an impl to get a map field as a HashMap<String, String>. Note that this will
allocate the map and allocate for each entry
impl<'a> TypedGetData<'a, HashMap<String, String>> for dyn GetData<'a> + '_
Provide an impl to get a map field as a HashMap<String, String>. Note that this will
allocate the map and allocate for each entry
Source§impl<'a> TypedGetData<'a, ListItem<'a>> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, ListItem<'a>> for dyn GetData<'a> + '_
Source§impl<'a> TypedGetData<'a, MapItem<'a>> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, MapItem<'a>> for dyn GetData<'a> + '_
Source§impl<'a> TypedGetData<'a, String> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, String> for dyn GetData<'a> + '_
Source§impl<'a> TypedGetData<'a, Vec<String>> for dyn GetData<'a> + '_
Provide an impl to get a list field as a Vec<String>. Note that this will allocate the vector
and allocate for each string entry.
impl<'a> TypedGetData<'a, Vec<String>> for dyn GetData<'a> + '_
Provide an impl to get a list field as a Vec<String>. Note that this will allocate the vector
and allocate for each string entry.