pub struct Client { /* private fields */ }Expand description
Micromegas FlightSQL client
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(channel: Channel) -> Self
pub fn new(channel: Channel) -> Self
Creates a new client from a grpc channel
§Arguments
channel- The gRPC channel to use for communication.
Sourcepub fn inner_mut(&mut self) -> &mut FlightSqlServiceClient<Channel>
pub fn inner_mut(&mut self) -> &mut FlightSqlServiceClient<Channel>
Returns a mutable reference to the inner FlightSqlServiceClient.
This allows direct access to the underlying FlightSQL client for advanced operations.
Sourcepub async fn query(
&mut self,
sql: String,
query_range: Option<TimeRange>,
) -> Result<Vec<RecordBatch>>
pub async fn query( &mut self, sql: String, query_range: Option<TimeRange>, ) -> Result<Vec<RecordBatch>>
Executes a SQL query and returns the results as a vector of RecordBatch.
§Arguments
sql- The SQL query string to execute.query_range- An optionalTimeRangeto filter the query results by time.
Sourcepub async fn query_stream(
&mut self,
sql: String,
query_range: Option<TimeRange>,
) -> Result<FlightRecordBatchStream>
pub async fn query_stream( &mut self, sql: String, query_range: Option<TimeRange>, ) -> Result<FlightRecordBatchStream>
Executes a SQL query and returns the results as a FlightRecordBatchStream.
This function is useful for processing large query results incrementally.
§Arguments
sql- The SQL query string to execute.query_range- An optionalTimeRangeto filter the query results by time.
Sourcepub async fn prepare_statement(
&mut self,
sql: String,
) -> Result<PreparedStatement>
pub async fn prepare_statement( &mut self, sql: String, ) -> Result<PreparedStatement>
Prepares a SQL statement and returns a PreparedStatement.
This function allows to compute the schema of a query without actually executing it.
§Arguments
sql- The SQL query string to prepare.
Auto Trait Implementations§
impl !Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].