Struct sqlite3::core::ResultRow
[−]
[src]
pub struct ResultRow<'res: 'row, 'row> { /* fields omitted */ }
Access to columns of a row.
Methods
impl<'res, 'row> ResultRow<'res, 'row>
[src]
Access to one row (step) of a result.
Note "These routines attempt to convert the value where appropriate."1
and "The value returned by sqlite3_column_type()
is only
meaningful if no type conversions have occurred as described
below. After a type conversion, the value returned by
sqlite3_column_type()
is undefined."1
fn column_count(&self) -> ColIx
cf sqlite3_column_count
TODO: consider returning Option
fn with_column_name<T, F: Fn(&str) -> T>(
&mut self,
i: ColIx,
default: T,
f: F
) -> T
&mut self,
i: ColIx,
default: T,
f: F
) -> T
Look up a column name and compute some function of it.
Return default
if there is no column i
cf sqlite_column_name
fn column_type(&self, col: ColIx) -> ColumnType
Look up the type of a column.
Return SQLITE_NULL
if there is no such col
.
fn column_int(&self, col: ColIx) -> i32
Get int
value of a column.
fn column_int64(&self, col: ColIx) -> i64
Get int64
value of a column.
fn column_double(&self, col: ColIx) -> f64
Get f64
(aka double) value of a column.
fn column_text(&self, col: ColIx) -> Option<String>
Get Option<String>
(aka text) value of a column.
fn column_str<'a>(&'a self, col: ColIx) -> Option<&'a str>
Get Option<&str>
(aka text) value of a column.
fn column_blob(&self, col: ColIx) -> Option<Vec<u8>>
Get Option<Vec<u8>>
(aka blob) value of a column.
fn column_slice<'a>(&'a self, col: ColIx) -> Option<&'a [u8]>
Get Option<&[u8]>
(aka blob) value of a column.