Trait taos_query::BlockExt 
source · [−]pub trait BlockExt: Debug + Sized {
    fn num_of_rows(&self) -> usize;
    fn fields(&self) -> &[Field];
    fn precision(&self) -> Precision;
    fn is_null(&self, row: usize, col: usize) -> bool;
    unsafe fn cell_unchecked(
        &self,
        row: usize,
        col: usize
    ) -> (&Field, BorrowedValue<'_>);
    unsafe fn get_col_unchecked(&self, col: usize) -> &ColumnView;
    fn field_count(&self) -> usize { ... }
    unsafe fn get_field_unchecked(&self, col: usize) -> &Field { ... }
    fn get_field(&self, col: usize) -> Option<&Field> { ... }
    fn columns_iter(&self) -> ColsIter<'_, Self>ⓘNotable traits for ColsIter<'b, T>impl<'b, T> Iterator for ColsIter<'b, T> where
    T: BlockExt,     type Item = &'b ColumnView; { ... }
}Expand description
Trait to define a data Block to fetch records bulky.
If query performance is not your main concern, you can just use the deserialize method from result set.
Required Methods
fn num_of_rows(&self) -> usize
fn num_of_rows(&self) -> usize
A block should container number of rows.
unsafe fn cell_unchecked(
    &self,
    row: usize,
    col: usize
) -> (&Field, BorrowedValue<'_>)
unsafe fn cell_unchecked(
    &self,
    row: usize,
    col: usize
) -> (&Field, BorrowedValue<'_>)
Safety
DO NOT call it directly.
unsafe fn get_col_unchecked(&self, col: usize) -> &ColumnView
Provided Methods
fn field_count(&self) -> usize
fn field_count(&self) -> usize
Number of fields.
unsafe fn get_field_unchecked(&self, col: usize) -> &Field
unsafe fn get_field_unchecked(&self, col: usize) -> &Field
fn columns_iter(&self) -> ColsIter<'_, Self>ⓘNotable traits for ColsIter<'b, T>impl<'b, T> Iterator for ColsIter<'b, T> where
    T: BlockExt,     type Item = &'b ColumnView;
fn columns_iter(&self) -> ColsIter<'_, Self>ⓘNotable traits for ColsIter<'b, T>impl<'b, T> Iterator for ColsIter<'b, T> where
    T: BlockExt,     type Item = &'b ColumnView;
T: BlockExt, type Item = &'b ColumnView;
Query by rows. Consume self into rows. Columns iterator with borrowed data from block.