Enum arrow_flight::sql::Command
source · pub enum Command {
Show 30 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),
CommandStatementQuery(CommandStatementQuery),
CommandStatementSubstraitPlan(CommandStatementSubstraitPlan),
CommandStatementUpdate(CommandStatementUpdate),
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)
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)
CommandStatementQuery(CommandStatementQuery)
CommandStatementSubstraitPlan(CommandStatementSubstraitPlan)
CommandStatementUpdate(CommandStatementUpdate)
DoPutUpdateResult(DoPutUpdateResult)
TicketStatementQuery(TicketStatementQuery)
Unknown(Any)
Any message that is not any FlightSQL command.
Implementations§
Trait Implementations§
source§impl PartialEq<Command> for Command
impl PartialEq<Command> for Command
impl StructuralPartialEq for Command
Auto Trait Implementations§
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
Mutably borrows from an owned value. Read more
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> 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