pub trait Session {
Show 22 methods
fn open(&mut self) -> Result<(), Box<dyn Error>>;
fn close(&mut self) -> Result<(), Box<dyn Error>>;
fn set_storage_group(
&mut self,
storage_group_id: &str
) -> Result<(), Box<dyn Error>>;
fn delete_storage_group(
&mut self,
storage_group_id: &str
) -> Result<(), Box<dyn Error>>;
fn delete_storage_groups(
&mut self,
storage_group_ids: Vec<&str>
) -> Result<(), Box<dyn Error>>;
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<(), Box<dyn Error>>
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<(), Box<dyn Error>>
where
T: Into<Option<Vec<Dictionary>>>;
fn delete_timeseries(
&mut self,
paths: Vec<&str>
) -> Result<(), Box<dyn Error>>;
fn delete_data(
&mut self,
paths: Vec<&str>,
start_time: i64,
end_time: i64
) -> Result<(), Box<dyn Error>>;
fn insert_string_record<T>(
&mut self,
device_id: &str,
measurements: Vec<&str>,
values: Vec<&str>,
timestamp: i64,
is_aligned: T
) -> Result<(), Box<dyn Error>>
where
T: Into<Option<bool>>;
fn get_time_zone(&mut self) -> Result<String, Box<dyn Error>>;
fn set_time_zone(&mut self, time_zone: &str) -> Result<(), Box<dyn Error>>;
fn execute_statement<T>(
&mut self,
statement: &str,
timeout_ms: T
) -> Result<Box<dyn DataSet>, Box<dyn Error>>
where
T: Into<Option<i64>>;
fn execute_query_statement<T>(
&mut self,
statement: &str,
timeout_ms: T
) -> Result<Box<dyn DataSet>, Box<dyn Error>>
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<(), Box<dyn Error>>
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<(), Box<dyn Error>>;
fn insert_records(
&mut self,
device_ids: Vec<&str>,
measurements: Vec<Vec<&str>>,
values: Vec<Vec<Value>>,
timestamps: Vec<i64>
) -> Result<(), Box<dyn Error>>;
fn insert_tablet(
&mut self,
tablet: &Tablet,
sorted: bool
) -> Result<(), Box<dyn Error>>;
fn insert_tablets(
&mut self,
tablets: Vec<&Tablet>,
sorted: bool
) -> Result<(), Box<dyn Error>>;
fn execute_batch_statement(
&mut self,
statemens: Vec<&str>
) -> Result<(), Box<dyn Error>>;
fn execute_raw_data_query(
&mut self,
paths: Vec<&str>,
start_time: i64,
end_time: i64
) -> Result<Box<dyn DataSet>, Box<dyn Error>>;
fn execute_update_statement(
&mut self,
statement: &str
) -> Result<Option<Box<dyn DataSet>>, Box<dyn Error>>;
}