Struct odbc_api::BlockCursorPolling
source · pub struct BlockCursorPolling<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::BlockCursor
.
Implementations§
source§impl<C, B> BlockCursorPolling<C, B>where
C: AsStatementRef,
impl<C, B> BlockCursorPolling<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.