pub trait Session<'a> {
Show 22 methods
// Required methods
fn open(&mut self) -> Result<()>;
fn close(&mut self) -> Result<()>;
fn set_storage_group(&mut self, storage_group_id: &str) -> Result<()>;
fn delete_storage_group(&mut self, storage_group_id: &str) -> Result<()>;
fn delete_storage_groups(
&mut self,
storage_group_ids: Vec<&str>,
) -> Result<()>;
fn create_timeseries<T>(
&mut self,
path: &str,
data_type: TSDataType,
encoding: TSEncoding,
compressor: TSCompressionType,
props: T,
attributes: T,
tags: T,
measurement_alias: Option<String>,
) -> Result<()>
where T: Into<Option<Dictionary>>;
fn create_multi_timeseries<T>(
&mut self,
paths: Vec<&str>,
data_types: Vec<TSDataType>,
encodings: Vec<TSEncoding>,
compressors: Vec<TSCompressionType>,
props_list: T,
attributes_list: T,
tags_list: T,
measurement_alias_list: Option<Vec<String>>,
) -> Result<()>
where T: Into<Option<Vec<Dictionary>>>;
fn delete_timeseries(&mut self, paths: Vec<&str>) -> Result<()>;
fn delete_data(
&mut self,
paths: Vec<&str>,
start_time: i64,
end_time: i64,
) -> Result<()>;
fn insert_string_record<T>(
&mut self,
device_id: &str,
measurements: Vec<&str>,
values: Vec<&str>,
timestamp: i64,
is_aligned: T,
) -> Result<()>
where T: Into<Option<bool>>;
fn get_time_zone(&mut self) -> Result<String>;
fn set_time_zone(&mut self, time_zone: &str) -> Result<()>;
fn execute_statement<T>(
&'a mut self,
statement: &str,
timeout_ms: T,
) -> Result<Box<dyn DataSet + 'a>>
where T: Into<Option<i64>>;
fn execute_query_statement<T>(
&'a mut self,
statement: &str,
timeout_ms: T,
) -> Result<Box<dyn DataSet + 'a>>
where T: Into<Option<i64>>;
fn insert_record<T>(
&mut self,
device_id: &str,
measurements: Vec<&str>,
values: Vec<Value>,
timestamp: i64,
is_aligned: T,
) -> Result<()>
where T: Into<Option<bool>>;
fn insert_records_of_one_device(
&mut self,
device_id: &str,
timestamps: Vec<i64>,
measurements: Vec<Vec<&str>>,
values: Vec<Vec<Value>>,
sorted: bool,
) -> Result<()>;
fn insert_records(
&mut self,
prefix_path: Vec<&str>,
measurements: Vec<Vec<&str>>,
values: Vec<Vec<Value>>,
timestamps: Vec<i64>,
) -> Result<()>;
fn insert_tablet(&mut self, tablet: &Tablet) -> Result<()>;
fn insert_tablets(&mut self, tablets: Vec<&Tablet>) -> Result<()>;
fn execute_batch_statement(&mut self, statemens: Vec<&str>) -> Result<()>;
fn execute_raw_data_query(
&'a mut self,
paths: Vec<&str>,
start_time: i64,
end_time: i64,
) -> Result<Box<dyn DataSet + 'a>>;
fn execute_update_statement(
&'a mut self,
statement: &str,
) -> Result<Option<Box<dyn DataSet + 'a>>>;
}
Required Methods§
fn open(&mut self) -> Result<()>
fn close(&mut self) -> Result<()>
fn set_storage_group(&mut self, storage_group_id: &str) -> Result<()>
fn delete_storage_group(&mut self, storage_group_id: &str) -> Result<()>
fn delete_storage_groups(&mut self, storage_group_ids: Vec<&str>) -> Result<()>
fn create_timeseries<T>( &mut self, path: &str, data_type: TSDataType, encoding: TSEncoding, compressor: TSCompressionType, props: T, attributes: T, tags: T, measurement_alias: Option<String>, ) -> Result<()>
fn create_multi_timeseries<T>( &mut self, paths: Vec<&str>, data_types: Vec<TSDataType>, encodings: Vec<TSEncoding>, compressors: Vec<TSCompressionType>, props_list: T, attributes_list: T, tags_list: T, measurement_alias_list: Option<Vec<String>>, ) -> Result<()>
fn delete_timeseries(&mut self, paths: Vec<&str>) -> Result<()>
fn delete_data( &mut self, paths: Vec<&str>, start_time: i64, end_time: i64, ) -> Result<()>
fn insert_string_record<T>( &mut self, device_id: &str, measurements: Vec<&str>, values: Vec<&str>, timestamp: i64, is_aligned: T, ) -> Result<()>
fn get_time_zone(&mut self) -> Result<String>
fn set_time_zone(&mut self, time_zone: &str) -> Result<()>
fn execute_statement<T>( &'a mut self, statement: &str, timeout_ms: T, ) -> Result<Box<dyn DataSet + 'a>>
fn execute_query_statement<T>( &'a mut self, statement: &str, timeout_ms: T, ) -> Result<Box<dyn DataSet + 'a>>
fn insert_record<T>( &mut self, device_id: &str, measurements: Vec<&str>, values: Vec<Value>, timestamp: i64, is_aligned: T, ) -> Result<()>
fn insert_records_of_one_device( &mut self, device_id: &str, timestamps: Vec<i64>, measurements: Vec<Vec<&str>>, values: Vec<Vec<Value>>, sorted: bool, ) -> Result<()>
fn insert_records( &mut self, prefix_path: Vec<&str>, measurements: Vec<Vec<&str>>, values: Vec<Vec<Value>>, timestamps: Vec<i64>, ) -> Result<()>
fn insert_tablet(&mut self, tablet: &Tablet) -> Result<()>
fn insert_tablets(&mut self, tablets: Vec<&Tablet>) -> Result<()>
fn execute_batch_statement(&mut self, statemens: Vec<&str>) -> Result<()>
fn execute_raw_data_query( &'a mut self, paths: Vec<&str>, start_time: i64, end_time: i64, ) -> Result<Box<dyn DataSet + 'a>>
fn execute_update_statement( &'a mut self, statement: &str, ) -> Result<Option<Box<dyn DataSet + 'a>>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.