Session

Struct Session 

Source
pub struct Session { /* private fields */ }
Expand description

IotDB Session

Implementations§

Source§

impl Session

Source

pub fn connect(config: Config) -> Result<Session>

Source

pub fn is_open(&self) -> bool

Source

pub fn is_close(&self) -> bool

Source

pub fn close(&mut self) -> Result<()>

Source

pub fn set_storage_group(&mut self, storage_group: &str) -> Result<()>

Set a storage group

Source

pub fn delete_storage_group(&mut self, storage_group: &str) -> Result<()>

Delete a storage group.

Source

pub fn delete_storage_groups( &mut self, storage_groups: Vec<String>, ) -> Result<()>

Delete storage groups.

Source

pub fn create_time_series( &mut self, ts_path: &str, data_type: DataType, encoding: Encoding, compressor: Compressor, ) -> Result<()>

Create single time-series

Source

pub fn create_multi_time_series( &mut self, ts_path_vec: Vec<String>, data_type_vec: Vec<i32>, encoding_vec: Vec<i32>, compressor_vec: Vec<i32>, ) -> Result<()>

Create multiple time-series

Source

pub fn delete_time_series(&mut self, path_vec: Vec<String>) -> Result<()>

Delete multiple time series

Source

pub fn check_time_series_exists(&mut self, path: &str) -> Result<bool>

Check whether a specific time-series exists

Source

pub fn delete_data( &mut self, path_vec: Vec<String>, timestamp: i64, ) -> Result<()>

Delete all data <= time in multiple time-series

Source

pub fn insert_string_records( &mut self, device_ids: Vec<String>, timestamps: Vec<i64>, measurements_list: Vec<Vec<String>>, values_list: Vec<Vec<String>>, is_aligned: bool, ) -> Result<()>

special case for inserting one row of String (TEXT) value

Source

pub fn insert_record( &mut self, device_id: &str, timestamp: i64, measurements: Vec<String>, values: Vec<u8>, is_aligned: bool, ) -> Result<()>

Insert record

Source

pub fn test_insert_record( &mut self, prefix_path: &str, timestamp: i64, measurements: Vec<String>, values: Vec<u8>, is_aligned: bool, ) -> Result<()>

this method NOT insert data into database and the server just return after accept the request, this method should be used to test other time cost in client

Source

pub fn insert_records( &mut self, prefix_paths: Vec<String>, timestamps: Vec<i64>, measurements_list: Vec<Vec<String>>, values_list: Vec<Vec<u8>>, is_aligned: bool, ) -> Result<()>

Insert records

Source

pub fn test_insert_records( &mut self, prefix_paths: Vec<String>, timestamps: Vec<i64>, measurements_list: Vec<Vec<String>>, values_list: Vec<Vec<u8>>, is_aligned: bool, ) -> Result<()>

this method NOT insert data into database and the server just return after accept the request, this method should be used to test other time cost in client

Source

pub fn insert_tablet( &mut self, prefix_path: &str, measurements: Vec<String>, values: Vec<u8>, timestamps: Vec<u8>, types: Vec<i32>, size: i32, is_aligned: bool, ) -> Result<()>

insert one tablet, in a tablet, for each timestamp, the number of measurements is same for example three records in the same device can form a tablet: timestamps, m1, m2, m3 1, 125.3, True, text1 2, 111.6, False, text2 3, 688.6, True, text3 Notice: The tablet should not have empty cell The tablet itself is sorted TODO

Source

pub fn insert_tablets( &mut self, prefix_paths: Vec<String>, measurements_list: Vec<Vec<String>>, values_list: Vec<Vec<u8>>, timestamps_list: Vec<Vec<u8>>, types_list: Vec<Vec<i32>>, size_list: Vec<i32>, is_aligned: bool, ) -> Result<()>

insert multiple tablets, tablets are independent to each other TODO

Source

pub fn insert_records_of_one_device()

TODO

Source

pub fn insert_records_of_one_device_sorte()

TODO

Source

pub fn gen_insert_records_of_one_device_request()

TODO

Source

pub fn test_insert_table()

this method NOT insert data into database and the server just return after accept the request, this method should be used to test other time cost in client TODO

Source

pub fn test_insert_tablets()

this method NOT insert data into database and the server just return after accept the request, this method should be used to test other time cost in client TODO

Source

pub fn gen_insert_tablet_req()

TODO

Source

pub fn gen_insert_tablets_req()

TODO

Source

pub fn sql(&mut self, sql: &str) -> Result<DataSet>

Source

pub fn exec_batch(&mut self, statements: Vec<String>) -> Result<()>

execute batch statement and return a DataSets

Source

pub fn exec_query(&mut self, query: &str) -> Result<DataSet>

execute query sql statement and return a DataSet

Source

pub fn exec_update(&mut self, statement: &str) -> Result<DataSet>

execute update statement and return a DataSet

Source

pub fn exec_raw_data_query( &mut self, paths: Vec<String>, start_time: i64, end_time: i64, ) -> Result<DataSet>

execute row statement and return a DataSets

Source

pub fn set_time_zone(&mut self, time_zone: &str) -> Result<()>

Set time zone

Source

pub fn time_zone(&mut self) -> Result<String>

Get time zone

Auto Trait Implementations§

§

impl Freeze for Session

§

impl !RefUnwindSafe for Session

§

impl !Send for Session

§

impl !Sync for Session

§

impl Unpin for Session

§

impl !UnwindSafe for Session

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.