pub struct LiquidCacheService { /* private fields */ }
Expand description
The LiquidCache server.
§Example
use arrow_flight::flight_service_server::FlightServiceServer;
use datafusion::prelude::SessionContext;
use liquid_cache_server::LiquidCacheService;
use tonic::transport::Server;
use liquid_cache_server::storage::policies::LruPolicy;
let liquid_cache = LiquidCacheService::new(SessionContext::new(), None, None, Default::default(), Box::new(LruPolicy::new())).unwrap();
let flight = FlightServiceServer::new(liquid_cache);
Server::builder()
.add_service(flight)
.serve("0.0.0.0:15214".parse().unwrap());
Implementations§
Source§impl LiquidCacheService
impl LiquidCacheService
Sourcepub fn try_new() -> Result<Self>
pub fn try_new() -> Result<Self>
Create a new LiquidCacheService with a default SessionContext With no disk cache and unbounded memory usage.
Sourcepub fn new(
ctx: SessionContext,
max_cache_bytes: Option<usize>,
disk_cache_dir: Option<PathBuf>,
cache_mode: CacheMode,
cache_policy: Box<dyn CachePolicy>,
) -> Result<Self>
pub fn new( ctx: SessionContext, max_cache_bytes: Option<usize>, disk_cache_dir: Option<PathBuf>, cache_mode: CacheMode, cache_policy: Box<dyn CachePolicy>, ) -> Result<Self>
Create a new LiquidCacheService with a custom SessionContext
§Arguments
ctx
- The SessionContext to usemax_cache_bytes
- The maximum number of bytes to cache in memorydisk_cache_dir
- The directory to store the disk cachecache_mode
- The CacheMode to use
Sourcepub fn cache(&self) -> &Option<LiquidCacheRef>
pub fn cache(&self) -> &Option<LiquidCacheRef>
Get a reference to the cache
Sourcepub fn context() -> Result<SessionContext, DataFusionError>
pub fn context() -> Result<SessionContext, DataFusionError>
Create a new SessionContext with good defaults This is the recommended way to create a SessionContext for LiquidCache
Sourcepub fn get_parquet_cache_dir(&self) -> &PathBuf
pub fn get_parquet_cache_dir(&self) -> &PathBuf
Get the parquet cache directory
Trait Implementations§
Source§impl Default for LiquidCacheService
impl Default for LiquidCacheService
Source§impl FlightSqlService for LiquidCacheService
impl FlightSqlService for LiquidCacheService
Source§type FlightService = LiquidCacheService
type FlightService = LiquidCacheService
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 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_action_fallback<'life0, 'async_trait>(
&'life0 self,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoActionStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_action_fallback<'life0, 'async_trait>(
&'life0 self,
request: Request<Action>,
) -> Pin<Box<dyn Future<Output = Result<Response<<Self as FlightService>::DoActionStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Implementors may override to handle additional calls to do_action()
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.
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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: 'async_trait,
Get a FlightInfo for executing a substrait plan.
Source§fn get_flight_info_prepared_statement<'life0, 'async_trait>(
&'life0 self,
_query: CommandPreparedStatementQuery,
_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_prepared_statement<'life0, 'async_trait>(
&'life0 self,
_query: CommandPreparedStatementQuery,
_request: Request<FlightDescriptor>,
) -> Pin<Box<dyn Future<Output = Result<Response<FlightInfo>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: 'async_trait,
Get a FlightInfo to extract information about the supported XDBC types.
Source§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()
Source§fn do_get_statement<'life0, 'async_trait>(
&'life0 self,
_ticket: TicketStatementQuery,
_request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn do_get_statement<'life0, 'async_trait>(
&'life0 self,
_ticket: TicketStatementQuery,
_request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn do_get_catalogs<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetCatalogs,
_request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn do_get_schemas<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetDbSchemas,
_request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn do_get_tables<'life0, 'async_trait>(
&'life0 self,
_query: CommandGetTables,
_request: Request<Ticket>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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::DoGetStream>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Get a FlightDataStream containing the data related to the supported XDBC types.
Source§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()
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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: 'async_trait,
Execute an update SQL statement.
Source§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.
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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: 'async_trait,
Bind parameters to given prepared statement. Read more
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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: 'async_trait,
Execute a substrait plan
Source§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
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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: '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
'life0: 'async_trait,
Self: 'async_trait,
Cancel a query
Source§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 LiquidCacheService
impl !RefUnwindSafe for LiquidCacheService
impl Send for LiquidCacheService
impl Sync for LiquidCacheService
impl Unpin for LiquidCacheService
impl !UnwindSafe for LiquidCacheService
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> FlightService for Twhere
T: 'static + FlightSqlService + Send,
impl<T> FlightService for Twhere
T: 'static + FlightSqlService + Send,
Source§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.
Source§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.
Source§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.
Source§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.
Source§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.
Source§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.
Source§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.
Source§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.
Source§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.
Source§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.
Source§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
Source§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.
Source§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.
Source§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.
Source§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.
Source§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.
Source§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.
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> 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