pub struct GrpcChunkStreamSync { /* private fields */ }Expand description
Blocking wrapper around GrpcChunkStream.
Returned by GrpcClientSync::execute_query_stream and the
AuthenticatedGrpcClientSync equivalent. Yields Arrow IPC byte chunks
one at a time, blocking on the shared Tokio runtime as needed.
Pair with
hyperdb_api::ArrowRowset::from_stream to
decode Arrow record batches incrementally with constant client memory.
Implementations§
Source§impl GrpcChunkStreamSync
impl GrpcChunkStreamSync
Sourcepub fn next_chunk(&mut self) -> Result<Option<Bytes>>
pub fn next_chunk(&mut self) -> Result<Option<Bytes>>
Returns the next Arrow IPC byte chunk, or None when the stream is
complete.
§Errors
Same failure modes as GrpcChunkStream::next_chunk —
transport errors and server-side query failures surface as
Error.
Sourcepub fn schema(&self) -> Option<&QueryResultSchema>
pub fn schema(&self) -> Option<&QueryResultSchema>
Returns the schema reported by the server, if one has been received yet.
Sourcepub fn query_id(&self) -> Option<&str>
pub fn query_id(&self) -> Option<&str>
Returns the server-assigned query ID, if one has been received.
Sourcepub fn rows_affected(&self) -> Option<u64>
pub fn rows_affected(&self) -> Option<u64>
Returns the affected row count for DML queries, if reported.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for GrpcChunkStreamSync
impl !RefUnwindSafe for GrpcChunkStreamSync
impl Send for GrpcChunkStreamSync
impl Sync for GrpcChunkStreamSync
impl Unpin for GrpcChunkStreamSync
impl UnsafeUnpin for GrpcChunkStreamSync
impl !UnwindSafe for GrpcChunkStreamSync
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
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