Skip to content

Commit 824d312

Browse files
authored
support new data types (#25)
1 parent 1b6b458 commit 824d312

File tree

109 files changed

+5961
-1536
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+5961
-1536
lines changed

Apache-IoTDB-Client-CSharp-UserCase/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static async Task CreateTimeseries()
5353
var session_pool = new SessionPool(host, port, pool_size);
5454
await session_pool.Open(false);
5555

56-
await session_pool.DeleteStorageGroupAsync("root.ln.wf01.wt01");
56+
await session_pool.DeleteDatabaseAsync("root.ln.wf01.wt01");
5757
var status = await session_pool.CreateTimeSeries("root.ln.wf01.wt01.status", TSDataType.BOOLEAN, TSEncoding.PLAIN, Compressor.SNAPPY);
5858
status = await session_pool.CreateTimeSeries("root.ln.wf01.wt01.temperature", TSDataType.DOUBLE, TSEncoding.PLAIN, Compressor.SNAPPY);
5959
status = await session_pool.CreateTimeSeries("root.ln.wf01.wt01.hardware", TSDataType.TEXT, TSEncoding.PLAIN, Compressor.SNAPPY);

docs/API.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ var tablet =
8181

8282
| api name | parameters | notes | use example |
8383
| -------------------------- | ------------------------------------------------------------ | --------------------------- | ------------------------------------------------------------ |
84-
| SetStorageGroup | string | set storage group | session_pool.SetStorageGroup("root.97209_TEST_CSHARP_CLIENT_GROUP_01") |
84+
| SetStorageGroup | string | set storage group | session_pool.CreateDatabase("root.97209_TEST_CSHARP_CLIENT_GROUP_01") |
8585
| CreateTimeSeries | string, TSDataType, TSEncoding, Compressor | create time series | session_pool.InsertTabletsAsync(tablets) |
86-
| DeleteStorageGroupAsync | string | delete single storage group | session_pool.DeleteStorageGroupAsync("root.97209_TEST_CSHARP_CLIENT_GROUP_01") |
87-
| DeleteStorageGroupsAsync | List<string> | delete storage group | session_pool.DeleteStorageGroupAsync("root.97209_TEST_CSHARP_CLIENT_GROUP") |
86+
| DeleteStorageGroupAsync | string | delete single storage group | session_pool.DeleteDatabaseAsync("root.97209_TEST_CSHARP_CLIENT_GROUP_01") |
87+
| DeleteStorageGroupsAsync | List<string> | delete storage group | session_pool.DeleteDatabaseAsync("root.97209_TEST_CSHARP_CLIENT_GROUP") |
8888
| CreateMultiTimeSeriesAsync | List<string>, List<TSDataType> , List<TSEncoding> , List<Compressor> | create multi time series | session_pool.CreateMultiTimeSeriesAsync(ts_path_lst, data_type_lst, encoding_lst, compressor_lst); |
8989
| DeleteTimeSeriesAsync | List<string> | delete time series | |
9090
| DeleteTimeSeriesAsync | string | delete time series | |

samples/Apache.IoTDB.Samples/SessionPoolTest.AlignedRecord.cs

Lines changed: 34 additions & 34 deletions
Large diffs are not rendered by default.

samples/Apache.IoTDB.Samples/SessionPoolTest.AlignedTablet.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public async Task TestInsertAlignedTablet()
3535
if (debug) session_pool.OpenDebugMode();
3636

3737
System.Diagnostics.Debug.Assert(session_pool.IsOpen());
38-
await session_pool.DeleteStorageGroupAsync(test_group_name);
39-
var device_id = string.Format("{0}.{1}", test_group_name, test_device);
38+
await session_pool.DeleteDatabaseAsync(test_database_name);
39+
var device_id = string.Format("{0}.{1}", test_database_name, test_device);
4040
var measurement_lst = new List<string>
4141
{ test_measurements[1],
4242
test_measurements[2],
@@ -53,7 +53,7 @@ public async Task TestInsertAlignedTablet()
5353
status = await session_pool.InsertAlignedTabletAsync(tablet);
5454
System.Diagnostics.Debug.Assert(status == 0);
5555
var res = await session_pool.ExecuteQueryStatementAsync(
56-
"select * from " + string.Format("{0}.{1}", test_group_name, test_device) + " where time<15");
56+
"select * from " + string.Format("{0}.{1}", test_database_name, test_device) + " where time<15");
5757
res.ShowTableNames();
5858
while (res.HasNext()) Console.WriteLine(res.Next());
5959

@@ -81,7 +81,7 @@ public async Task TestInsertAlignedTablet()
8181
var end_ms = DateTime.Now.Ticks / 10000;
8282
Console.WriteLine(string.Format("total tablet insert time is {0}", end_ms - start_ms));
8383
res = await session_pool.ExecuteQueryStatementAsync(
84-
"select * from " + string.Format("{0}.{1}", test_group_name, test_device));
84+
"select * from " + string.Format("{0}.{1}", test_database_name, test_device));
8585
res.ShowTableNames();
8686
var res_count = 0;
8787
while (res.HasNext())
@@ -93,7 +93,7 @@ public async Task TestInsertAlignedTablet()
9393
await res.Close();
9494
Console.WriteLine(res_count + " " + fetch_size * processed_size);
9595
System.Diagnostics.Debug.Assert(res_count == fetch_size * processed_size);
96-
status = await session_pool.DeleteStorageGroupAsync(test_group_name);
96+
status = await session_pool.DeleteDatabaseAsync(test_database_name);
9797
System.Diagnostics.Debug.Assert(status == 0);
9898
await session_pool.Close();
9999
Console.WriteLine("TestInsertAlignedTablet Passed!");
@@ -107,11 +107,11 @@ public async Task TestInsertAlignedTablets()
107107
if (debug) session_pool.OpenDebugMode();
108108

109109
System.Diagnostics.Debug.Assert(session_pool.IsOpen());
110-
await session_pool.DeleteStorageGroupAsync(test_group_name);
110+
await session_pool.DeleteDatabaseAsync(test_database_name);
111111
var device_id = new List<string>()
112112
{
113-
string.Format("{0}.{1}", test_group_name, test_devices[1]),
114-
string.Format("{0}.{1}", test_group_name, test_devices[2])
113+
string.Format("{0}.{1}", test_database_name, test_devices[1]),
114+
string.Format("{0}.{1}", test_database_name, test_devices[2])
115115
};
116116
var measurements_lst = new List<List<string>>()
117117
{
@@ -148,7 +148,7 @@ public async Task TestInsertAlignedTablets()
148148
status = await session_pool.InsertAlignedTabletsAsync(tablets);
149149
System.Diagnostics.Debug.Assert(status == 0);
150150
var res = await session_pool.ExecuteQueryStatementAsync(
151-
"select * from " + string.Format("{0}.{1}", test_group_name, test_devices[1]) + " where time<15");
151+
"select * from " + string.Format("{0}.{1}", test_database_name, test_devices[1]) + " where time<15");
152152
res.ShowTableNames();
153153
while (res.HasNext()) Console.WriteLine(res.Next());
154154

@@ -157,7 +157,7 @@ public async Task TestInsertAlignedTablets()
157157
// tablets = new List<Tablet>() { };
158158
for (var timestamp = 4; timestamp <= processed_size * fetch_size; timestamp++)
159159
{
160-
var local_device_id = string.Format("{0}.{1}", test_group_name, test_devices[1]);
160+
var local_device_id = string.Format("{0}.{1}", test_database_name, test_devices[1]);
161161
var local_measurements = new List<string>()
162162
{test_measurements[1], test_measurements[2], test_measurements[3]};
163163
var local_value = new List<List<object>>() { new() { "iotdb", true, (int)timestamp } };
@@ -174,7 +174,7 @@ public async Task TestInsertAlignedTablets()
174174

175175
Task.WaitAll(tasks.ToArray());
176176
res = await session_pool.ExecuteQueryStatementAsync(
177-
"select * from " + string.Format("{0}.{1}", test_group_name, test_devices[1]));
177+
"select * from " + string.Format("{0}.{1}", test_database_name, test_devices[1]));
178178
res.ShowTableNames();
179179
var res_count = 0;
180180
while (res.HasNext())
@@ -186,7 +186,7 @@ public async Task TestInsertAlignedTablets()
186186
await res.Close();
187187
Console.WriteLine(res_count + " " + fetch_size * processed_size);
188188
System.Diagnostics.Debug.Assert(res_count == fetch_size * processed_size);
189-
status = await session_pool.DeleteStorageGroupAsync(test_group_name);
189+
status = await session_pool.DeleteDatabaseAsync(test_database_name);
190190
System.Diagnostics.Debug.Assert(status == 0);
191191
await session_pool.Close();
192192
Console.WriteLine("TestInsertAlignedTablets Passed!");

0 commit comments

Comments
 (0)