[][src]Struct odbc_iter::ResultSet

pub struct ResultSet<'h, 'c, V, S, C: Configuration> { /* fields omitted */ }

Iterator over result set rows.

Items of this iterator can be of any type that implements TryFromRow that includes common Rust types and tuples.

Implementations

impl<'h, 'c: 'h, V, S, C: Configuration> ResultSet<'h, 'c, V, S, C> where
    V: TryFromRow<C>, 
[src]

pub fn schema(&self) -> &[ColumnType][src]

Information about column types.

pub fn configuration(&self) -> &C[src]

Get associated data access configuration object.

pub fn single(self) -> Result<V, DataAccessError>[src]

Get exactly one row from the result set. This function will fail if zero or more than one rows would be provided.

pub fn first(self) -> Result<V, DataAccessError>[src]

Get first row from the result set. Any following rows are discarded. This function will fail no rows were provided.

pub fn no_result(self) -> Result<(), DataAccessError>[src]

Assert that the query returned no rows. This function will fail if there was at least one row provided. This is useful when working with SQL statements that produce no rows like "INSERT".

impl<'h, 'c: 'h, V, C: Configuration> ResultSet<'h, 'c, V, Prepared, C> where
    V: TryFromRow<C>, 
[src]

pub fn close(self) -> Result<PreparedStatement<'c>, OdbcError>[src]

Close the result set and discard any not consumed rows.

pub fn affected_rows(&self) -> Result<Option<i64>, OdbcError>[src]

When available provides information on number of rows affected by query (e.g. "DELETE" statement).

impl<'h, 'c: 'h, V, C: Configuration> ResultSet<'h, 'c, V, Executed, C> where
    V: TryFromRow<C>, 
[src]

pub fn close(self) -> Result<(), OdbcError>[src]

Close the result set and discard any not consumed rows.

pub fn affected_rows(&self) -> Result<Option<i64>, OdbcError>[src]

When available provides information on number of rows affected by query (e.g. "DELETE" statement).

Trait Implementations

impl<'h, 'c, V, S, C: Configuration> Debug for ResultSet<'h, 'c, V, S, C>[src]

impl<'h, 'c, V, S, C: Configuration> Drop for ResultSet<'h, 'c, V, S, C>[src]

impl<'h, 'c: 'h, V, S, C: Configuration> Iterator for ResultSet<'h, 'c, V, S, C> where
    V: TryFromRow<C>, 
[src]

type Item = Result<V, DataAccessError>

The type of the elements being iterated over.

Auto Trait Implementations

impl<'h, 'c, V, S, C> RefUnwindSafe for ResultSet<'h, 'c, V, S, C> where
    C: RefUnwindSafe,
    S: RefUnwindSafe,
    V: RefUnwindSafe

impl<'h, 'c, V, S, C> !Send for ResultSet<'h, 'c, V, S, C>

impl<'h, 'c, V, S, C> !Sync for ResultSet<'h, 'c, V, S, C>

impl<'h, 'c, V, S, C> Unpin for ResultSet<'h, 'c, V, S, C> where
    C: Unpin,
    S: Unpin

impl<'h, 'c, V, S, C> UnwindSafe for ResultSet<'h, 'c, V, S, C> where
    C: UnwindSafe,
    S: UnwindSafe,
    V: RefUnwindSafe

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<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToErrorNoContext<T> for 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<E, C> WrapContext<C> for E[src]

type ContextError = ErrorContext<E, C>