Struct oracle::Row [−][src]
pub struct Row { /* fields omitted */ }
Row in a result set of a select statement
Methods
impl Row
[src]
impl Row
pub fn get<I, T>(&self, colidx: I) -> Result<T> where
I: ColumnIndex,
T: FromSql,
[src]
pub fn get<I, T>(&self, colidx: I) -> Result<T> where
I: ColumnIndex,
T: FromSql,
Gets the column value at the specified index.
pub fn sql_values(&self) -> &[SqlValue]
[src]
pub fn sql_values(&self) -> &[SqlValue]
Returns column values as a vector of SqlValue
pub fn get_as<T>(&self) -> Result<T::Item> where
T: RowValue,
[src]
pub fn get_as<T>(&self) -> Result<T::Item> where
T: RowValue,
Gets column values as specified type.
Type inference for the return type doesn't work. You need to specify
it explicitly such as row.get_as::<(i32, String>()
.
See RowValue for available return types.
let conn = Connection::connect("scott", "tiger", "", &[])?; let mut stmt = conn.prepare("select empno, ename from emp", &[])?; for result in &stmt.query(&[])? { let row = result?; // Gets a row as `(i32, String)`. let (empno, ename) = row.get_as::<(i32, String)>()?; println!("{},{}", empno, ename); }
Trait Implementations
impl Debug for Row
[src]
impl Debug for Row
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl RowValue for Row
[src]
impl RowValue for Row