Struct odbc_api::RowSetCursorPolling
source · [−]pub struct RowSetCursorPolling<C, B> where
C: AsStatementRef, { /* private fields */ }
Expand description
Asynchronously iterates in blocks (called row sets) over a result set, filling a buffers with
a lot of rows at once, instead of iterating the result set row by row. This is usually much
faster. Asynchronous sibiling of self::RowSetCursor
.
Implementations
sourceimpl<C, B> RowSetCursorPolling<C, B> where
C: AsStatementRef,
impl<C, B> RowSetCursorPolling<C, B> where
C: AsStatementRef,
sourcepub async fn fetch(&mut self, sleep: impl Sleep) -> Result<Option<&B>, Error>
pub async fn fetch(&mut self, sleep: impl Sleep) -> Result<Option<&B>, Error>
Fills the bound buffer with the next row set.
Return
None
if the result set is empty and all row sets have been extracted. Some
with a
reference to the internal buffer otherwise.
sourcepub async fn fetch_with_truncation_check(
&mut self,
error_for_truncation: bool,
sleep: impl Sleep
) -> Result<Option<&B>, Error>
pub async fn fetch_with_truncation_check(
&mut self,
error_for_truncation: bool,
sleep: impl Sleep
) -> Result<Option<&B>, Error>
Fills the bound buffer with the next row set. Should error_for_truncation
be true
and any
diagnostic indicate truncation of a value an error is returned.
Return
None
if the result set is empty and all row sets have been extracted. Some
with a
reference to the internal buffer otherwise.
Call this method to find out wether there are any truncated values in the batch, without inspecting all its rows and columns.
Trait Implementations
sourceimpl<C, B> Drop for RowSetCursorPolling<C, B> where
C: AsStatementRef,
impl<C, B> Drop for RowSetCursorPolling<C, B> where
C: AsStatementRef,
Auto Trait Implementations
impl<C, B> RefUnwindSafe for RowSetCursorPolling<C, B> where
B: RefUnwindSafe,
C: RefUnwindSafe,
impl<C, B> Send for RowSetCursorPolling<C, B> where
B: Send,
C: Send,
impl<C, B> Sync for RowSetCursorPolling<C, B> where
B: Sync,
C: Sync,
impl<C, B> Unpin for RowSetCursorPolling<C, B> where
B: Unpin,
C: Unpin,
impl<C, B> UnwindSafe for RowSetCursorPolling<C, B> where
B: UnwindSafe,
C: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more