pub struct FlightSqlService { /* private fields */ }
Expand description
FlightSqlService is a basic stateless FlightSqlService implementation.
Implementations§
Source§impl FlightSqlService
impl FlightSqlService
Sourcepub fn new(state: SessionState) -> Self
pub fn new(state: SessionState) -> Self
Creates a new FlightSqlService with a static SessionState.
Sourcepub fn new_with_provider(provider: Box<dyn SessionStateProvider>) -> Self
pub fn new_with_provider(provider: Box<dyn SessionStateProvider>) -> Self
Creates a new FlightSqlService with a SessionStateProvider.
Sourcepub fn with_sql_options(self, sql_options: SQLOptions) -> Self
pub fn with_sql_options(self, sql_options: SQLOptions) -> Self
Replaces the sql_options with the provided options.
These options are used to verify all SQL queries.
When None the default [SQLOptions
] are used.
pub async fn serve(self, addr: String) -> Result<(), Box<dyn Error>>
Trait Implementations§
Source§impl FlightSqlService for FlightSqlService
impl FlightSqlService for FlightSqlService
Source§type FlightService = FlightSqlService
type FlightService = FlightSqlService
When impl FlightSqlService, you can always set FlightService to Self
Source§fn do_handshake<'life0, 'async_trait>(
&'life0 self,
_request: Request<Streaming<HandshakeRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Pin<Box<dyn Stream<Item = Result<HandshakeResponse, Status>> + Send>>>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_handshake<'life0, 'async_trait>(
&'life0 self,
_request: Request<Streaming<HandshakeRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Pin<Box<dyn Stream<Item = Result<HandshakeResponse, Status>> + Send>>>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Accept authentication and return a token
https://arrow.apache.org/docs/format/Flight.html#authentication
Source§fn do_get_fallback<'life0, 'async_trait>(
&'life0 self,
request: Request<Ticket>,
_message: Any,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_get_fallback<'life0, 'async_trait>(
&'life0 self,
request: Request<Ticket>,
_message: Any,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Implementors may override to handle additional calls to do_get()
Source§fn get_flight_info_statement<'life0, 'async_trait>(
&'life0 self,
query: CommandStatementQuery,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_flight_info_statement<'life0, 'async_trait>(
&'life0 self,
query: CommandStatementQuery,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightInfo for executing a SQL query.
Source§fn get_flight_info_substrait_plan<'life0, 'async_trait>(
&'life0 self,
query: CommandStatementSubstraitPlan,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_flight_info_substrait_plan<'life0, 'async_trait>(
&'life0 self,
query: CommandStatementSubstraitPlan,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightInfo for executing a substrait plan.
Source§fn get_flight_info_prepared_statement<'life0, 'async_trait>(
&'life0 self,
cmd: CommandPreparedStatementQuery,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_flight_info_prepared_statement<'life0, 'async_trait>(
&'life0 self,
cmd: CommandPreparedStatementQuery,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightInfo for executing an already created prepared statement.
Source§fn get_flight_info_catalogs<'life0, 'async_trait>(
&'life0 self,
query: CommandGetCatalogs,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_flight_info_catalogs<'life0, 'async_trait>(
&'life0 self,
query: CommandGetCatalogs,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightInfo for listing catalogs.
Source§fn get_flight_info_schemas<'life0, 'async_trait>(
&'life0 self,
query: CommandGetDbSchemas,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_flight_info_schemas<'life0, 'async_trait>(
&'life0 self,
query: CommandGetDbSchemas,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightInfo for listing schemas.
Source§fn get_flight_info_tables<'life0, 'async_trait>(
&'life0 self,
query: CommandGetTables,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_flight_info_tables<'life0, 'async_trait>(
&'life0 self,
query: CommandGetTables,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightInfo for listing tables.
Source§fn get_flight_info_table_types<'life0, 'async_trait>(
&'life0 self,
query: CommandGetTableTypes,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_flight_info_table_types<'life0, 'async_trait>(
&'life0 self,
query: CommandGetTableTypes,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightInfo to extract information about the table types.
Source§fn get_flight_info_sql_info<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetSqlInfo,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_flight_info_sql_info<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetSqlInfo,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightInfo for retrieving other information (See SqlInfo).
Source§fn get_flight_info_primary_keys<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetPrimaryKeys,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_flight_info_primary_keys<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetPrimaryKeys,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightInfo to extract information about primary and foreign keys.
Source§fn get_flight_info_exported_keys<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetExportedKeys,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_flight_info_exported_keys<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetExportedKeys,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightInfo to extract information about exported keys.
Source§fn get_flight_info_imported_keys<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetImportedKeys,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_flight_info_imported_keys<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetImportedKeys,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightInfo to extract information about imported keys.
Source§fn get_flight_info_cross_reference<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetCrossReference,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_flight_info_cross_reference<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetCrossReference,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightInfo to extract information about cross reference.
Source§fn get_flight_info_xdbc_type_info<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetXdbcTypeInfo,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_flight_info_xdbc_type_info<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetXdbcTypeInfo,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightInfo to extract information about the supported XDBC types.
Source§fn do_get_statement<'life0, 'async_trait>(
&'life0 self,
_ticket: TicketStatementQuery,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_get_statement<'life0, 'async_trait>(
&'life0 self,
_ticket: TicketStatementQuery,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightDataStream containing the query results.
Source§fn do_get_prepared_statement<'life0, 'async_trait>(
&'life0 self,
_query: CommandPreparedStatementQuery,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_get_prepared_statement<'life0, 'async_trait>(
&'life0 self,
_query: CommandPreparedStatementQuery,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightDataStream containing the prepared statement query results.
Source§fn do_get_catalogs<'life0, 'async_trait>(
&'life0 self,
query: CommandGetCatalogs,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_get_catalogs<'life0, 'async_trait>(
&'life0 self,
query: CommandGetCatalogs,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightDataStream containing the list of catalogs.
Source§fn do_get_schemas<'life0, 'async_trait>(
&'life0 self,
query: CommandGetDbSchemas,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_get_schemas<'life0, 'async_trait>(
&'life0 self,
query: CommandGetDbSchemas,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightDataStream containing the list of schemas.
Source§fn do_get_tables<'life0, 'async_trait>(
&'life0 self,
query: CommandGetTables,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_get_tables<'life0, 'async_trait>(
&'life0 self,
query: CommandGetTables,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightDataStream containing the list of tables.
Source§fn do_get_table_types<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetTableTypes,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_get_table_types<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetTableTypes,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightDataStream containing the data related to the table types.
Source§fn do_get_sql_info<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetSqlInfo,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_get_sql_info<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetSqlInfo,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightDataStream containing the list of SqlInfo results.
Source§fn do_get_primary_keys<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetPrimaryKeys,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_get_primary_keys<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetPrimaryKeys,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightDataStream containing the data related to the primary and foreign keys.
Source§fn do_get_exported_keys<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetExportedKeys,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_get_exported_keys<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetExportedKeys,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightDataStream containing the data related to the exported keys.
Source§fn do_get_imported_keys<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetImportedKeys,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_get_imported_keys<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetImportedKeys,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightDataStream containing the data related to the imported keys.
Source§fn do_get_cross_reference<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetCrossReference,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_get_cross_reference<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetCrossReference,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightDataStream containing the data related to the cross reference.
Source§fn do_get_xdbc_type_info<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetXdbcTypeInfo,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_get_xdbc_type_info<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetXdbcTypeInfo,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a FlightDataStream containing the data related to the supported XDBC types.
Source§fn do_put_statement_update<'life0, 'async_trait>(
&'life0 self,
_ticket: CommandStatementUpdate,
request: Request<PeekableFlightDataStream>,
) -> Pin<Box<dyn Future<Output = Result<i64, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_put_statement_update<'life0, 'async_trait>(
&'life0 self,
_ticket: CommandStatementUpdate,
request: Request<PeekableFlightDataStream>,
) -> Pin<Box<dyn Future<Output = Result<i64, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute an update SQL statement.
Source§fn do_put_prepared_statement_query<'life0, 'async_trait>(
&'life0 self,
query: CommandPreparedStatementQuery,
request: Request<PeekableFlightDataStream>,
) -> Pin<Box<dyn Future<Output = Result<DoPutPreparedStatementResult, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_put_prepared_statement_query<'life0, 'async_trait>(
&'life0 self,
query: CommandPreparedStatementQuery,
request: Request<PeekableFlightDataStream>,
) -> Pin<Box<dyn Future<Output = Result<DoPutPreparedStatementResult, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Bind parameters to given prepared statement. Read more
Source§fn do_put_prepared_statement_update<'life0, 'async_trait>(
&'life0 self,
_handle: CommandPreparedStatementUpdate,
request: Request<PeekableFlightDataStream>,
) -> Pin<Box<dyn Future<Output = Result<i64, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_put_prepared_statement_update<'life0, 'async_trait>(
&'life0 self,
_handle: CommandPreparedStatementUpdate,
request: Request<PeekableFlightDataStream>,
) -> Pin<Box<dyn Future<Output = Result<i64, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute an update SQL prepared statement.
Source§fn do_put_substrait_plan<'life0, 'async_trait>(
&'life0 self,
_query: CommandStatementSubstraitPlan,
request: Request<PeekableFlightDataStream>,
) -> Pin<Box<dyn Future<Output = Result<i64, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_put_substrait_plan<'life0, 'async_trait>(
&'life0 self,
_query: CommandStatementSubstraitPlan,
request: Request<PeekableFlightDataStream>,
) -> Pin<Box<dyn Future<Output = Result<i64, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute a substrait plan
Source§fn do_action_create_prepared_statement<'life0, 'async_trait>(
&'life0 self,
query: ActionCreatePreparedStatementRequest,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<ActionCreatePreparedStatementResult, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_action_create_prepared_statement<'life0, 'async_trait>(
&'life0 self,
query: ActionCreatePreparedStatementRequest,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<ActionCreatePreparedStatementResult, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a prepared statement from given SQL statement.
Source§fn do_action_close_prepared_statement<'life0, 'async_trait>(
&'life0 self,
query: ActionClosePreparedStatementRequest,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<(), Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_action_close_prepared_statement<'life0, 'async_trait>(
&'life0 self,
query: ActionClosePreparedStatementRequest,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<(), Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Close a prepared statement.
Source§fn do_action_create_prepared_substrait_plan<'life0, 'async_trait>(
&'life0 self,
_query: ActionCreatePreparedSubstraitPlanRequest,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<ActionCreatePreparedStatementResult, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_action_create_prepared_substrait_plan<'life0, 'async_trait>(
&'life0 self,
_query: ActionCreatePreparedSubstraitPlanRequest,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<ActionCreatePreparedStatementResult, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a prepared substrait plan.
Source§fn do_action_begin_transaction<'life0, 'async_trait>(
&'life0 self,
_query: ActionBeginTransactionRequest,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<ActionBeginTransactionResult, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_action_begin_transaction<'life0, 'async_trait>(
&'life0 self,
_query: ActionBeginTransactionRequest,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<ActionBeginTransactionResult, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Begin a transaction
Source§fn do_action_end_transaction<'life0, 'async_trait>(
&'life0 self,
_query: ActionEndTransactionRequest,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<(), Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_action_end_transaction<'life0, 'async_trait>(
&'life0 self,
_query: ActionEndTransactionRequest,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<(), Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
End a transaction
Source§fn do_action_begin_savepoint<'life0, 'async_trait>(
&'life0 self,
_query: ActionBeginSavepointRequest,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<ActionBeginSavepointResult, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_action_begin_savepoint<'life0, 'async_trait>(
&'life0 self,
_query: ActionBeginSavepointRequest,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<ActionBeginSavepointResult, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Begin a savepoint
Source§fn do_action_end_savepoint<'life0, 'async_trait>(
&'life0 self,
_query: ActionEndSavepointRequest,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<(), Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_action_end_savepoint<'life0, 'async_trait>(
&'life0 self,
_query: ActionEndSavepointRequest,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<(), Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
End a savepoint
Source§fn do_action_cancel_query<'life0, 'async_trait>(
&'life0 self,
_query: ActionCancelQueryRequest,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<ActionCancelQueryResult, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_action_cancel_query<'life0, 'async_trait>(
&'life0 self,
_query: ActionCancelQueryRequest,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<ActionCancelQueryResult, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Cancel a query
Source§fn register_sql_info<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: i32,
_result: &'life1 SqlInfo,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn register_sql_info<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: i32,
_result: &'life1 SqlInfo,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Register a new SqlInfo result, making it available when calling GetSqlInfo.
§fn get_flight_info_fallback<'life0, 'async_trait>(
&'life0 self,
cmd: Command,
_request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_flight_info_fallback<'life0, 'async_trait>(
&'life0 self,
cmd: Command,
_request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Implementors may override to handle additional calls to get_flight_info()
§fn do_put_fallback<'life0, 'async_trait>(
&'life0 self,
_request: Request<PeekableFlightDataStream>,
message: Any,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::DoPutStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn do_put_fallback<'life0, 'async_trait>(
&'life0 self,
_request: Request<PeekableFlightDataStream>,
message: Any,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::DoPutStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Implementors may override to handle additional calls to do_put()
§fn do_put_statement_ingest<'life0, 'async_trait>(
&'life0 self,
_ticket: CommandStatementIngest,
_request: Request<PeekableFlightDataStream>,
) -> Pin<Box<dyn Future<Output = Result<i64, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn do_put_statement_ingest<'life0, 'async_trait>(
&'life0 self,
_ticket: CommandStatementIngest,
_request: Request<PeekableFlightDataStream>,
) -> Pin<Box<dyn Future<Output = Result<i64, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Execute a bulk ingestion.
§fn do_action_fallback<'life0, 'async_trait>(
&'life0 self,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::DoActionStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn do_action_fallback<'life0, 'async_trait>(
&'life0 self,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::DoActionStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Implementors may override to handle additional calls to do_action()
§fn list_custom_actions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<Vec<Result<ActionType, Status>>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn list_custom_actions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<Vec<Result<ActionType, Status>>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Add custom actions to list_actions() result
§fn do_exchange_fallback<'life0, 'async_trait>(
&'life0 self,
_request: Request<Streaming<FlightData>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::DoExchangeStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn do_exchange_fallback<'life0, 'async_trait>(
&'life0 self,
_request: Request<Streaming<FlightData>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::DoExchangeStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
do_exchange
Implementors may override to handle additional calls to do_exchange()
Auto Trait Implementations§
impl Freeze for FlightSqlService
impl !RefUnwindSafe for FlightSqlService
impl Send for FlightSqlService
impl Sync for FlightSqlService
impl Unpin for FlightSqlService
impl !UnwindSafe for FlightSqlService
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> FlightService for Twhere
T: 'static + FlightSqlService + Send,
impl<T> FlightService for Twhere
T: 'static + FlightSqlService + Send,
§type HandshakeStream = Pin<Box<dyn Stream<Item = Result<HandshakeResponse, Status>> + Send>>
type HandshakeStream = Pin<Box<dyn Stream<Item = Result<HandshakeResponse, Status>> + Send>>
Server streaming response type for the Handshake method.
§type ListFlightsStream = Pin<Box<dyn Stream<Item = Result<FlightInfo, Status>> + Send>>
type ListFlightsStream = Pin<Box<dyn Stream<Item = Result<FlightInfo, Status>> + Send>>
Server streaming response type for the ListFlights method.
§type DoGetStream = Pin<Box<dyn Stream<Item = Result<FlightData, Status>> + Send>>
type DoGetStream = Pin<Box<dyn Stream<Item = Result<FlightData, Status>> + Send>>
Server streaming response type for the DoGet method.
§type DoPutStream = Pin<Box<dyn Stream<Item = Result<PutResult, Status>> + Send>>
type DoPutStream = Pin<Box<dyn Stream<Item = Result<PutResult, Status>> + Send>>
Server streaming response type for the DoPut method.
§type DoActionStream = Pin<Box<dyn Stream<Item = Result<Result, Status>> + Send>>
type DoActionStream = Pin<Box<dyn Stream<Item = Result<Result, Status>> + Send>>
Server streaming response type for the DoAction method.
§type ListActionsStream = Pin<Box<dyn Stream<Item = Result<ActionType, Status>> + Send>>
type ListActionsStream = Pin<Box<dyn Stream<Item = Result<ActionType, Status>> + Send>>
Server streaming response type for the ListActions method.
§type DoExchangeStream = Pin<Box<dyn Stream<Item = Result<FlightData, Status>> + Send>>
type DoExchangeStream = Pin<Box<dyn Stream<Item = Result<FlightData, Status>> + Send>>
Server streaming response type for the DoExchange method.
§fn handshake<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<HandshakeRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<<T as FlightService>::HandshakeStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn handshake<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<HandshakeRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<<T as FlightService>::HandshakeStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Handshake between client and server. Depending on the server, the
handshake may be required to determine the token that should be used for
future operations. Both request and response are streams to allow multiple
round-trips depending on auth mechanism.
§fn list_flights<'life0, 'async_trait>(
&'life0 self,
_request: Request<Criteria>,
) -> Pin<Box<dyn Future<Output = Result<Response<<T as FlightService>::ListFlightsStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn list_flights<'life0, 'async_trait>(
&'life0 self,
_request: Request<Criteria>,
) -> Pin<Box<dyn Future<Output = Result<Response<<T as FlightService>::ListFlightsStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Get a list of available streams given a particular criteria. Most flight
services will expose one or more streams that are readily available for
retrieval. This api allows listing the streams available for
consumption. A user can also provide a criteria. The criteria can limit
the subset of streams that can be listed via this interface. Each flight
service allows its own definition of how to consume criteria.
§fn get_flight_info<'life0, 'async_trait>(
&'life0 self,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn get_flight_info<'life0, 'async_trait>(
&'life0 self,
request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
For a given FlightDescriptor, get information about how the flight can be
consumed. This is a useful interface if the consumer of the interface
already can identify the specific flight to consume. This interface can
also allow a consumer to generate a flight stream through a specified
descriptor. For example, a flight descriptor might be something that
includes a SQL statement or a Pickled Python operation that will be
executed. In those cases, the descriptor will not be previously available
within the list of available streams provided by ListFlights but will be
available for consumption for the duration defined by the specific flight
service.
§fn poll_flight_info<'life0, 'async_trait>(
&'life0 self,
_request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<PollInfo>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn poll_flight_info<'life0, 'async_trait>(
&'life0 self,
_request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<PollInfo>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
For a given FlightDescriptor, start a query and get information
to poll its execution status. This is a useful interface if the
query may be a long-running query. The first PollFlightInfo call
should return as quickly as possible. (GetFlightInfo doesn’t
return until the query is complete.) Read more
§fn get_schema<'life0, 'async_trait>(
&'life0 self,
_request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<SchemaResult>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn get_schema<'life0, 'async_trait>(
&'life0 self,
_request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<SchemaResult>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
For a given FlightDescriptor, get the Schema as described in Schema.fbs::Schema
This is used when a consumer needs the Schema of flight stream. Similar to
GetFlightInfo this interface may generate a new flight that was not previously
available in ListFlights.
§fn do_get<'life0, 'async_trait>(
&'life0 self,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<T as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn do_get<'life0, 'async_trait>(
&'life0 self,
request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<<T as FlightService>::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Retrieve a single stream associated with a particular descriptor
associated with the referenced ticket. A Flight can be composed of one or
more streams where each stream can be retrieved using a separate opaque
ticket that the flight service uses for managing a collection of streams.
§fn do_put<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<FlightData>>,
) -> Pin<Box<dyn Future<Output = Result<Response<<T as FlightService>::DoPutStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn do_put<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<FlightData>>,
) -> Pin<Box<dyn Future<Output = Result<Response<<T as FlightService>::DoPutStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Push a stream to the flight service associated with a particular
flight stream. This allows a client of a flight service to upload a stream
of data. Depending on the particular flight service, a client consumer
could be allowed to upload a single stream per descriptor or an unlimited
number. In the latter, the service might implement a ‘seal’ action that
can be applied to a descriptor once all streams are uploaded.
§fn list_actions<'life0, 'async_trait>(
&'life0 self,
_request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<<T as FlightService>::ListActionsStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn list_actions<'life0, 'async_trait>(
&'life0 self,
_request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<<T as FlightService>::ListActionsStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
A flight service exposes all of the available action types that it has
along with descriptions. This allows different flight consumers to
understand the capabilities of the flight service.
§fn do_action<'life0, 'async_trait>(
&'life0 self,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<Response<<T as FlightService>::DoActionStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn do_action<'life0, 'async_trait>(
&'life0 self,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<Response<<T as FlightService>::DoActionStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Flight services can support an arbitrary number of simple actions in
addition to the possible ListFlights, GetFlightInfo, DoGet, DoPut
operations that are potentially available. DoAction allows a flight client
to do a specific action against a flight service. An action includes
opaque request and response objects that are specific to the type action
being undertaken.
§fn do_exchange<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<FlightData>>,
) -> Pin<Box<dyn Future<Output = Result<Response<<T as FlightService>::DoExchangeStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn do_exchange<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<FlightData>>,
) -> Pin<Box<dyn Future<Output = Result<Response<<T as FlightService>::DoExchangeStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Open a bidirectional data channel for a given descriptor. This
allows clients to send and receive arbitrary Arrow data and
application-specific metadata in a single logical stream. In
contrast to DoGet/DoPut, this is more suited for clients
offloading computation (rather than storage) to a Flight service.
§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> 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>
Converts
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>
Converts
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>
Wrap the input message
T
in a tonic::Request