pub enum Command {
Show 32 variants
ActionBeginSavepointRequest(ActionBeginSavepointRequest),
ActionBeginSavepointResult(ActionBeginSavepointResult),
ActionBeginTransactionRequest(ActionBeginTransactionRequest),
ActionBeginTransactionResult(ActionBeginTransactionResult),
ActionCancelQueryRequest(ActionCancelQueryRequest),
ActionCancelQueryResult(ActionCancelQueryResult),
ActionClosePreparedStatementRequest(ActionClosePreparedStatementRequest),
ActionCreatePreparedStatementRequest(ActionCreatePreparedStatementRequest),
ActionCreatePreparedStatementResult(ActionCreatePreparedStatementResult),
ActionCreatePreparedSubstraitPlanRequest(ActionCreatePreparedSubstraitPlanRequest),
ActionEndSavepointRequest(ActionEndSavepointRequest),
ActionEndTransactionRequest(ActionEndTransactionRequest),
CommandGetCatalogs(CommandGetCatalogs),
CommandGetCrossReference(CommandGetCrossReference),
CommandGetDbSchemas(CommandGetDbSchemas),
CommandGetExportedKeys(CommandGetExportedKeys),
CommandGetImportedKeys(CommandGetImportedKeys),
CommandGetPrimaryKeys(CommandGetPrimaryKeys),
CommandGetSqlInfo(CommandGetSqlInfo),
CommandGetTableTypes(CommandGetTableTypes),
CommandGetTables(CommandGetTables),
CommandGetXdbcTypeInfo(CommandGetXdbcTypeInfo),
CommandPreparedStatementQuery(CommandPreparedStatementQuery),
CommandPreparedStatementUpdate(CommandPreparedStatementUpdate),
CommandStatementIngest(CommandStatementIngest),
CommandStatementQuery(CommandStatementQuery),
CommandStatementSubstraitPlan(CommandStatementSubstraitPlan),
CommandStatementUpdate(CommandStatementUpdate),
DoPutPreparedStatementResult(DoPutPreparedStatementResult),
DoPutUpdateResult(DoPutUpdateResult),
TicketStatementQuery(TicketStatementQuery),
Unknown(Any),
}
Expand description
Helper to convert to/from protobuf Any
message
to a specific FlightSQL command message.
§Example
let flightsql_message = CommandStatementQuery {
query: "SELECT * FROM foo".to_string(),
transaction_id: None,
};
// Given a packed FlightSQL Any message
let any_message = Any::pack(&flightsql_message).unwrap();
// decode it to Command:
match Command::try_from(any_message).unwrap() {
Command::CommandStatementQuery(decoded) => {
assert_eq!(flightsql_message, decoded);
}
_ => panic!("Unexpected decoded message"),
}
Variants§
ActionBeginSavepointRequest(ActionBeginSavepointRequest)
ActionBeginSavepointRequestvariant
ActionBeginSavepointResult(ActionBeginSavepointResult)
ActionBeginSavepointResultvariant
ActionBeginTransactionRequest(ActionBeginTransactionRequest)
ActionBeginTransactionRequestvariant
ActionBeginTransactionResult(ActionBeginTransactionResult)
ActionBeginTransactionResultvariant
ActionCancelQueryRequest(ActionCancelQueryRequest)
ActionCancelQueryRequestvariant
ActionCancelQueryResult(ActionCancelQueryResult)
ActionCancelQueryResultvariant
ActionClosePreparedStatementRequest(ActionClosePreparedStatementRequest)
ActionClosePreparedStatementRequestvariant
ActionCreatePreparedStatementRequest(ActionCreatePreparedStatementRequest)
ActionCreatePreparedStatementRequestvariant
ActionCreatePreparedStatementResult(ActionCreatePreparedStatementResult)
ActionCreatePreparedStatementResultvariant
ActionCreatePreparedSubstraitPlanRequest(ActionCreatePreparedSubstraitPlanRequest)
ActionCreatePreparedSubstraitPlanRequestvariant
ActionEndSavepointRequest(ActionEndSavepointRequest)
ActionEndSavepointRequestvariant
ActionEndTransactionRequest(ActionEndTransactionRequest)
ActionEndTransactionRequestvariant
CommandGetCatalogs(CommandGetCatalogs)
CommandGetCatalogsvariant
CommandGetCrossReference(CommandGetCrossReference)
CommandGetCrossReferencevariant
CommandGetDbSchemas(CommandGetDbSchemas)
CommandGetDbSchemasvariant
CommandGetExportedKeys(CommandGetExportedKeys)
CommandGetExportedKeysvariant
CommandGetImportedKeys(CommandGetImportedKeys)
CommandGetImportedKeysvariant
CommandGetPrimaryKeys(CommandGetPrimaryKeys)
CommandGetPrimaryKeysvariant
CommandGetSqlInfo(CommandGetSqlInfo)
CommandGetSqlInfovariant
CommandGetTableTypes(CommandGetTableTypes)
CommandGetTableTypesvariant
CommandGetTables(CommandGetTables)
CommandGetTablesvariant
CommandGetXdbcTypeInfo(CommandGetXdbcTypeInfo)
CommandGetXdbcTypeInfovariant
CommandPreparedStatementQuery(CommandPreparedStatementQuery)
CommandPreparedStatementQueryvariant
CommandPreparedStatementUpdate(CommandPreparedStatementUpdate)
CommandPreparedStatementUpdatevariant
CommandStatementIngest(CommandStatementIngest)
CommandStatementIngestvariant
CommandStatementQuery(CommandStatementQuery)
CommandStatementQueryvariant
CommandStatementSubstraitPlan(CommandStatementSubstraitPlan)
CommandStatementSubstraitPlanvariant
CommandStatementUpdate(CommandStatementUpdate)
CommandStatementUpdatevariant
DoPutPreparedStatementResult(DoPutPreparedStatementResult)
DoPutPreparedStatementResultvariant
DoPutUpdateResult(DoPutUpdateResult)
DoPutUpdateResultvariant
TicketStatementQuery(TicketStatementQuery)
TicketStatementQueryvariant
Unknown(Any)
Any message that is not any FlightSQL command.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl !Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
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>
T
in a tonic::Request