[][src]Struct oracle::Row

pub struct Row { /* fields omitted */ }

Row in a result set of a select statement

Implementations

impl Row[src]

pub fn get<I, T>(&self, colidx: I) -> Result<T> where
    I: ColumnIndex,
    T: FromSql
[src]

Gets the column value at the specified index.

pub fn sql_values(&self) -> &[SqlValue][src]

Returns column values as a vector of SqlValue

pub fn get_as<T>(&self) -> Result<T> where
    T: RowValue
[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 = 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 RowValue for Row[src]

Auto Trait Implementations

impl !RefUnwindSafe for Row

impl !Send for Row

impl !Sync for Row

impl Unpin for Row

impl !UnwindSafe for Row

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Err = <U as TryFrom<T>>::Err