pub struct SqlInfoData {
batch: RecordBatch,
}
Expand description
A builder for SqlInfoData
which is used to create CommandGetSqlInfo
responses.
§Example
// Create the list of metadata describing the server
let mut builder = SqlInfoDataBuilder::new();
builder.append(SqlInfo::FlightSqlServerName, "server name");
// ... add other SqlInfo here ..
builder.append(
SqlInfo::FlightSqlServerTransaction,
SqlSupportedTransaction::Transaction as i32,
);
// Create the batch to send back to the client
let info_data = builder.build().unwrap();
Fields§
§batch: RecordBatch
Implementations§
Source§impl SqlInfoData
impl SqlInfoData
Sourcepub fn record_batch(
&self,
info: impl IntoIterator<Item = u32>,
) -> Result<RecordBatch>
pub fn record_batch( &self, info: impl IntoIterator<Item = u32>, ) -> Result<RecordBatch>
Return a [RecordBatch
] containing only the requested u32
, if any
from CommandGetSqlInfo
Sourcepub fn schema(&self) -> SchemaRef
pub fn schema(&self) -> SchemaRef
Return the schema of the RecordBatch that will be returned
from CommandGetSqlInfo
Auto Trait Implementations§
impl Freeze for SqlInfoData
impl !RefUnwindSafe for SqlInfoData
impl Send for SqlInfoData
impl Sync for SqlInfoData
impl Unpin for SqlInfoData
impl !UnwindSafe for SqlInfoData
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> 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