pub struct SqlInfoDataBuilder {
infos: BTreeMap<u32, SqlInfoValue>,
}
Expand description
Helper to create CommandGetSqlInfo
responses.
CommandGetSqlInfo
are metadata requests used by a Flight SQL
server to communicate supported capabilities to Flight SQL clients.
Servers constuct - usually static - SqlInfoData
via the SqlInfoDataBuilder
,
and build responses using CommandGetSqlInfo::into_builder
Fields§
§infos: BTreeMap<u32, SqlInfoValue>
Use BTreeMap to ensure the values are sorted by value as to make output consistent
Use u32 to support “custom” sql info values that are not part of the SqlInfo enum
Implementations§
Source§impl SqlInfoDataBuilder
impl SqlInfoDataBuilder
Sourcepub fn append(&mut self, name: impl SqlInfoName, value: impl Into<SqlInfoValue>)
pub fn append(&mut self, name: impl SqlInfoName, value: impl Into<SqlInfoValue>)
register the specific sql metadata item
Sourcepub fn build(self) -> Result<SqlInfoData>
pub fn build(self) -> Result<SqlInfoData>
Encode the contents of this list according to the FlightSQL spec
Sourcepub fn schema() -> &'static Schema
pub fn schema() -> &'static Schema
Return the [Schema
] for a GetSchema RPC call with crate::sql::CommandGetSqlInfo
Trait Implementations§
Source§impl Clone for SqlInfoDataBuilder
impl Clone for SqlInfoDataBuilder
Source§fn clone(&self) -> SqlInfoDataBuilder
fn clone(&self) -> SqlInfoDataBuilder
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SqlInfoDataBuilder
impl Debug for SqlInfoDataBuilder
Source§impl Default for SqlInfoDataBuilder
impl Default for SqlInfoDataBuilder
Source§fn default() -> SqlInfoDataBuilder
fn default() -> SqlInfoDataBuilder
Returns the “default value” for a type. Read more
Source§impl PartialEq for SqlInfoDataBuilder
impl PartialEq for SqlInfoDataBuilder
impl StructuralPartialEq for SqlInfoDataBuilder
Auto Trait Implementations§
impl Freeze for SqlInfoDataBuilder
impl RefUnwindSafe for SqlInfoDataBuilder
impl Send for SqlInfoDataBuilder
impl Sync for SqlInfoDataBuilder
impl Unpin for SqlInfoDataBuilder
impl UnwindSafe for SqlInfoDataBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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> 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