record数据进行封装和抽象。| timestamp | status | temperature |
|---|---|---|
| 1 | 0 | 20 |
var rowRecord = new RowRecord(long timestamps, List<object> values, List<string> measurements);
| time | status | temperature |
|---|---|---|
| 1 | 0 | 20 |
| 2 | 0 | 20 |
| 3 | 3 | 21 |
var tablet = Tablet(string deviceId, List<string> measurements, List<List<object>> values, List<long> timestamps);
| api name | parameters | notes | use example |
|---|---|---|---|
| Open | bool | open session | session_pool.Open(false) |
| Close | null | close session | session_pool.Close() |
| IsOpen | null | check if session is open | session_pool.IsOpen() |
| OpenDebugMode | LoggingConfiguration=null | open debug mode | session_pool.OpenDebugMode() |
| CloseDebugMode | null | close debug mode | session_pool.CloseDebugMode() |
| SetTimeZone | string | set time zone | session_pool.GetTimeZone() |
| GetTimeZone | null | get time zone | session_pool.GetTimeZone() |
| api name | parameters | notes | use example |
|---|---|---|---|
| InsertRecordAsync | string, RowRecord | insert single record | session_pool.InsertRecordAsync(“root.97209_TEST_CSHARP_CLIENT_GROUP.TEST_CSHARP_CLIENT_DEVICE”, new RowRecord(1, values, measures)); |
| InsertRecordsAsync | List, List | insert records | session_pool.InsertRecordsAsync(device_id, rowRecords) |
| InsertRecordsOfOneDeviceAsync | string, List | insert records of one device | session_pool.InsertRecordsOfOneDeviceAsync(device_id, rowRecords) |
| InsertRecordsOfOneDeviceSortedAsync | string, List | insert sorted records of one device | InsertRecordsOfOneDeviceSortedAsync(deviceId, sortedRowRecords); |
| TestInsertRecordAsync | string, RowRecord | test insert record | session_pool.TestInsertRecordAsync(“root.97209_TEST_CSHARP_CLIENT_GROUP.TEST_CSHARP_CLIENT_DEVICE”, rowRecord) |
| TestInsertRecordsAsync | List, List | test insert record | session_pool.TestInsertRecordsAsync(device_id, rowRecords) |
| api name | parameters | notes | use example |
|---|---|---|---|
| InsertTabletAsync | Tablet | insert single tablet | session_pool.InsertTabletAsync(tablet) |
| InsertTabletsAsync | List | insert tablets | session_pool.InsertTabletsAsync(tablets) |
| TestInsertTabletAsync | Tablet | test insert tablet | session_pool.TestInsertTabletAsync(tablet) |
| TestInsertTabletsAsync | List | test insert tablets | session_pool.TestInsertTabletsAsync(tablets) |
| api name | parameters | notes | use example |
|---|---|---|---|
| ExecuteQueryStatementAsync | string | execute sql query statement | session_pool.ExecuteQueryStatementAsync(“select * from root.97209_TEST_CSHARP_CLIENT_GROUP.TEST_CSHARP_CLIENT_DEVICE where time<15”); |
| ExecuteNonQueryStatementAsync | string | execute sql nonquery statement | session_pool.ExecuteNonQueryStatementAsync( “create timeseries root.97209_TEST_CSHARP_CLIENT_GROUP.TEST_CSHARP_CLIENT_DEVICE.status with datatype=BOOLEAN,encoding=PLAIN”) |
| api name | parameters | notes | use example |
|---|---|---|---|
| SetStorageGroup | string | set storage group | session_pool.CreateDatabase(“root.97209_TEST_CSHARP_CLIENT_GROUP_01”) |
| CreateTimeSeries | string, TSDataType, TSEncoding, Compressor | create time series | session_pool.InsertTabletsAsync(tablets) |
| DeleteStorageGroupAsync | string | delete single storage group | session_pool.DeleteDatabaseAsync(“root.97209_TEST_CSHARP_CLIENT_GROUP_01”) |
| DeleteStorageGroupsAsync | List | delete storage group | session_pool.DeleteDatabaseAsync(“root.97209_TEST_CSHARP_CLIENT_GROUP”) |
| CreateMultiTimeSeriesAsync | List, List , List , List | create multi time series | session_pool.CreateMultiTimeSeriesAsync(ts_path_lst, data_type_lst, encoding_lst, compressor_lst); |
| DeleteTimeSeriesAsync | List | delete time series | |
| DeleteTimeSeriesAsync | string | delete time series | |
| DeleteDataAsync | List, long, long | delete data | session_pool.DeleteDataAsync(ts_path_lst, 2, 3) |
| api name | parameters | notes | use example |
|---|---|---|---|
| CheckTimeSeriesExistsAsync | string | check if time series exists | session_pool.CheckTimeSeriesExistsAsync(time series) |