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§
Sourcefn column_count(&self) -> usize
fn column_count(&self) -> usize
Return the number of columns.
Sourcefn column_name(&self, i: usize) -> Option<&str>
fn column_name(&self, i: usize) -> Option<&str>
Return the name of a column. The first column has index 0.
Sourcefn column_names(&self) -> Vec<&str>
fn column_names(&self) -> Vec<&str>
Return column names.
Sourcefn column_type(&self, i: usize) -> ColumnType
fn column_type(&self, i: usize) -> ColumnType
Return the type of a column. The first column has index 0.
Sourcefn next(&mut self) -> ForensicResult<bool>
fn next(&mut self) -> ForensicResult<bool>
Advance to the next state until there no more data is available (return=Ok(false)).
Sourcefn read(&self, i: usize) -> ForensicResult<ColumnValue>
fn read(&self, i: usize) -> ForensicResult<ColumnValue>
Read a value from a column. The first column has index 0.