Struct oracle::Row [−][src]
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]
I: ColumnIndex,
T: FromSql,
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]
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,