SqlStatement

Trait SqlStatement 

Source
pub trait SqlStatement {
    // Required methods
    fn column_count(&self) -> usize;
    fn column_name(&self, i: usize) -> Option<&str>;
    fn column_names(&self) -> Vec<&str>;
    fn column_type(&self, i: usize) -> ColumnType;
    fn next(&mut self) -> ForensicResult<bool>;
    fn read(&self, i: usize) -> ForensicResult<ColumnValue>;
}
Expand description

It allows decoupling the SQL database access library from the analysis library.

Required Methods§

Source

fn column_count(&self) -> usize

Return the number of columns.

Source

fn column_name(&self, i: usize) -> Option<&str>

Return the name of a column. The first column has index 0.

Source

fn column_names(&self) -> Vec<&str>

Return column names.

Source

fn column_type(&self, i: usize) -> ColumnType

Return the type of a column. The first column has index 0.

Source

fn next(&mut self) -> ForensicResult<bool>

Advance to the next state until there no more data is available (return=Ok(false)).

Source

fn read(&self, i: usize) -> ForensicResult<ColumnValue>

Read a value from a column. The first column has index 0.

Implementors§