Skip to content

Commit

Permalink
Add query test
Browse files Browse the repository at this point in the history
  • Loading branch information
HTHou authored Nov 14, 2024
1 parent 6183614 commit 77e88b1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions samples/Apache.IoTDB.Samples/SessionPoolTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -461,12 +461,19 @@ await session_pool.ExecuteNonQueryStatementAsync(
while (res.HasNext()) Console.WriteLine(res.Next());

await res.Close();
Console.WriteLine("SELECT sql Passed");
Console.WriteLine("SELECT * sql Passed");
res = await session_pool.ExecuteQueryStatementAsync(
"select * from " + string.Format("{0}.{1}", test_group_name, test_device) + " where time<10");
res.ShowTableNames();
while (res.HasNext()) Console.WriteLine(res.Next());

await res.Close();
Console.WriteLine("SELECT sql Passed");
res = await session_pool.ExecuteQueryStatementAsync(
"select timestamp, status, temperature, hardware from " + string.Format("{0}.{1}", test_group_name, test_device) + " where time<10");
res.ShowTableNames();
while (res.HasNext()) Console.WriteLine(res.Next());

await res.Close();
status = await session_pool.DeleteStorageGroupAsync(test_group_name);
System.Diagnostics.Debug.Assert(status == 0);
Expand Down Expand Up @@ -569,4 +576,4 @@ public async Task TestLastDataQuery()
Console.WriteLine("LastDataQuery Passed");
}
}
}
}

0 comments on commit 77e88b1

Please sign in to comment.