pub struct RowIterator { /* private fields */ }Expand description
An iterator over rows returned by a query.
CompleteQuery::read() returns a
RowIterator.
RowIterator yields rows from the query result set, automatically requesting
subsequent pages from BigQuery as needed until the entire result set has been consumed.
§Example
let mut rows = client
.query("SELECT name, state FROM `bigquery-public-data.usa_names.usa_1910_2013` LIMIT 10")
.until_done()
.await?
.read();
while let Some(row) = rows.next().await.transpose()? {
let name: String = row.get("name");
let state: String = row.get("state");
println!("{name} from {state}");
}Implementations§
Source§impl RowIterator
impl RowIterator
Sourcepub fn set_max_results(self, max_results: u32) -> Self
pub fn set_max_results(self, max_results: u32) -> Self
Sets the maximum number of rows to buffer in memory.
This controls page size during network fetches when streaming result sets.
§Example
let mut rows = client
.query("SELECT 1 AS n")
.until_done()
.await?
.read()
.set_max_results(500);Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RowIterator
impl !UnwindSafe for RowIterator
impl Freeze for RowIterator
impl Send for RowIterator
impl Sync for RowIterator
impl Unpin for RowIterator
impl UnsafeUnpin for RowIterator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request