Struct oracle::Row [] [src]

pub struct Row { /* fields omitted */ }

Row in a result set of a select statement

Methods

impl Row
[src]

[src]

Gets the column value at the specified index.

[src]

Returns column values as a vector of SqlValue

[src]

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 = oracle::Connection::new("scott", "tiger", "").unwrap();
let mut stmt = conn.prepare("select empno, ename from emp").unwrap();

for result in stmt.query(&[]).unwrap() {
    let row = result.unwrap();
    // Gets a row as `(i32, String)`.
    let (empno, ename) = row.get_as::<(i32, String)>().unwrap();
    println!("{},{}", empno, ename);
}