Trait Connection

Source
pub trait Connection: Send + Sync {
Show 19 methods // Required methods fn info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ConnectionInfo> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn last_query_id(&self) -> Option<String>; fn exec<'life0, 'life1, 'async_trait>( &'life0 self, sql: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn kill_query<'life0, 'life1, 'async_trait>( &'life0 self, query_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn query_iter<'life0, 'life1, 'async_trait>( &'life0 self, sql: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<RowIterator>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn query_iter_ext<'life0, 'life1, 'async_trait>( &'life0 self, sql: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<RowStatsIterator>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_presigned_url<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, operation: &'life1 str, stage: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<PresignedResponse>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn upload_to_stage<'life0, 'life1, 'async_trait>( &'life0 self, stage: &'life1 str, data: Reader, size: u64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn load_data<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, sql: &'life1 str, data: Reader, size: u64, file_format_options: Option<BTreeMap<&'life2 str, &'life3 str>>, copy_options: Option<BTreeMap<&'life4 str, &'life5 str>>, ) -> Pin<Box<dyn Future<Output = Result<ServerStats>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait; fn load_file<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>( &'life0 self, sql: &'life1 str, fp: &'life2 Path, format_options: Option<BTreeMap<&'life3 str, &'life4 str>>, copy_options: Option<BTreeMap<&'life5 str, &'life6 str>>, ) -> Pin<Box<dyn Future<Output = Result<ServerStats>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait; fn stream_load<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, sql: &'life1 str, data: Vec<Vec<&'life2 str>>, ) -> Pin<Box<dyn Future<Output = Result<ServerStats>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; // Provided methods fn close<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn version<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn query_row<'life0, 'life1, 'async_trait>( &'life0 self, sql: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Row>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn query_all<'life0, 'life1, 'async_trait>( &'life0 self, sql: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Row>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn query_raw_iter<'life0, 'life1, 'async_trait>( &'life0 self, _sql: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<RawRowIterator>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn query_raw_all<'life0, 'life1, 'async_trait>( &'life0 self, sql: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<RawRow>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn put_files<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, local_file: &'life1 str, stage: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<RowStatsIterator>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn get_files<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, stage: &'life1 str, local_file: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<RowStatsIterator>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... }
}

Required Methods§

Source

fn info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ConnectionInfo> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn last_query_id(&self) -> Option<String>

Source

fn exec<'life0, 'life1, 'async_trait>( &'life0 self, sql: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn kill_query<'life0, 'life1, 'async_trait>( &'life0 self, query_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn query_iter<'life0, 'life1, 'async_trait>( &'life0 self, sql: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<RowIterator>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn query_iter_ext<'life0, 'life1, 'async_trait>( &'life0 self, sql: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<RowStatsIterator>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_presigned_url<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, operation: &'life1 str, stage: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<PresignedResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get presigned url for a given operation and stage location. The operation can be “UPLOAD” or “DOWNLOAD”.

Source

fn upload_to_stage<'life0, 'life1, 'async_trait>( &'life0 self, stage: &'life1 str, data: Reader, size: u64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn load_data<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, sql: &'life1 str, data: Reader, size: u64, file_format_options: Option<BTreeMap<&'life2 str, &'life3 str>>, copy_options: Option<BTreeMap<&'life4 str, &'life5 str>>, ) -> Pin<Box<dyn Future<Output = Result<ServerStats>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait,

Source

fn load_file<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>( &'life0 self, sql: &'life1 str, fp: &'life2 Path, format_options: Option<BTreeMap<&'life3 str, &'life4 str>>, copy_options: Option<BTreeMap<&'life5 str, &'life6 str>>, ) -> Pin<Box<dyn Future<Output = Result<ServerStats>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait,

Source

fn stream_load<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, sql: &'life1 str, data: Vec<Vec<&'life2 str>>, ) -> Pin<Box<dyn Future<Output = Result<ServerStats>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Provided Methods§

Source

fn close<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn version<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn query_row<'life0, 'life1, 'async_trait>( &'life0 self, sql: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Row>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn query_all<'life0, 'life1, 'async_trait>( &'life0 self, sql: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Row>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn query_raw_iter<'life0, 'life1, 'async_trait>( &'life0 self, _sql: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<RawRowIterator>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn query_raw_all<'life0, 'life1, 'async_trait>( &'life0 self, sql: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<RawRow>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn put_files<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, local_file: &'life1 str, stage: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<RowStatsIterator>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn get_files<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, stage: &'life1 str, local_file: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<RowStatsIterator>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementors§