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>where
B: RowSetBuffer,
pub async fn fetch(&mut self, sleep: impl Sleep) -> Result<Option<&B>, Error>where
B: RowSetBuffer,
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>where
B: RowSetBuffer,
pub async fn fetch_with_truncation_check(
&mut self,
error_for_truncation: bool,
sleep: impl Sleep,
) -> Result<Option<&B>, Error>where
B: RowSetBuffer,
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 whether there are any truncated values in the batch, without inspecting all its rows and columns.