pub struct FlightSqlDriver { /* private fields */ }flight only.Expand description
Default Flight SQL driver. Requires a QUERY to be passed as a table option.
If USERNAME (and optionally PASSWORD) are passed,
will perform the Handshake using basic authentication.
Any additional headers for the GetFlightInfo call can be passed as table options
using the HEADER_PREFIX prefix.
If a token is returned by the server with the handshake response, it will be
stored as a gRPC authorization header within the returned FlightMetadata,
to be sent with the subsequent DoGet requests.
Implementations§
Source§impl FlightSqlDriver
impl FlightSqlDriver
pub fn new() -> Self
Sourcepub fn with_properties_template(
self,
properties_template: FlightProperties,
) -> Self
pub fn with_properties_template( self, properties_template: FlightProperties, ) -> Self
Custom flight properties to be returned from the metadata call instead of the default ones. The headers (if any) will only be used for the Handshake/GetFlightInfo calls by default. This behaviour can be changed by calling Self::with_persistent_headers below. Headers provided as options for the metadata call will overwrite the template ones.
Sourcepub fn with_persistent_headers(self, persistent_headers: bool) -> Self
pub fn with_persistent_headers(self, persistent_headers: bool) -> Self
Propagate the static headers configured for Handshake/GetFlightInfo to the subsequent DoGet calls.
Trait Implementations§
Source§impl Clone for FlightSqlDriver
impl Clone for FlightSqlDriver
Source§fn clone(&self) -> FlightSqlDriver
fn clone(&self) -> FlightSqlDriver
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FlightSqlDriver
impl Debug for FlightSqlDriver
Source§impl Default for FlightSqlDriver
impl Default for FlightSqlDriver
Source§fn default() -> FlightSqlDriver
fn default() -> FlightSqlDriver
Source§impl FlightDriver for FlightSqlDriver
impl FlightDriver for FlightSqlDriver
Source§fn metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
channel: Channel,
options: &'life1 HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<FlightMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
channel: Channel,
options: &'life1 HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<FlightMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl Freeze for FlightSqlDriver
impl RefUnwindSafe for FlightSqlDriver
impl Send for FlightSqlDriver
impl Sync for FlightSqlDriver
impl Unpin for FlightSqlDriver
impl UnwindSafe for FlightSqlDriver
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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>
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>
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 moreSource§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>
T in a tonic::Request