Fix SessionDataSet: row count, async dispose, and null measurement issues (#53, #54, #55) (#56) * Fix SessionDataSet: row count, async dispose, and null measurement issues (#53, #54, #55) 修复 SessionDataSet 行数统计、异步释放及空值测点问题 - Fix CurrentBatchRowCount() always returning 0 by eagerly constructing the first TsBlock in RpcDataSet constructor when initial data is available 修复 CurrentBatchRowCount() 始终返回 0 的问题,在构造函数中预先反序列化首个 TsBlock - Add IAsyncDisposable to SessionDataSet and RpcDataSet, providing DisposeAsync() that properly awaits Close() to avoid sync-over-async deadlocks 为 SessionDataSet 和 RpcDataSet 添加 IAsyncDisposable 接口,支持 await using 语法 - Fix GetRow() including null-valued columns in RowRecord by using IsNull() check before calling type-specific getters, instead of relying on value type null checks which always pass for int/bool/float/etc. 修复 GetRow() 中值类型默认值绕过 null 检查导致空值列被错误包含的问题 * Fix SessionDataSet.Close() idempotency and add regression tests 修复 SessionDataSet.Close() 幂等性问题并添加回归测试 - Set _isClosed = true in Close() finally block to prevent NullReferenceException on repeated Close/Dispose/DisposeAsync calls 在 Close() 的 finally 块中设置 _isClosed = true,防止重复调用导致空引用异常 - Add RpcDataSetTests covering: - CurrentBatchRowCount returns correct size before first row read - CurrentBatchRowCount returns 0 when no data - GetRow excludes null-valued measurements for value types (BOOLEAN, INT32, DOUBLE) - DataTypes/Measurements/Values lists stay consistent 添加 RpcDataSet 回归测试覆盖行数统计和空值测点排除
This is the C# client of Apache IoTDB.
Apache IoTDB (Internet of Things Database) is a data management system for time series data, which can provide users specific services, such as, data collection, storage and analysis. Due to its light weight structure, high performance and usable features together with its seamless integration with the Hadoop and Spark ecology, IoTDB meets the requirements of massive dataset storage, high throughput data input, and complex data analysis in the industrial IoT field.
Apache IoTDB website: https://iotdb.apache.org Apache IoTDB Github: https://github.com/apache/iotdb
We have prepared a Nuget Package for C# users. Users can directly install the Apache IoTDB client using the .NET CLI. To install, simply run the following command in your command line:
dotnet add package Apache.IoTDB
For more details, visit the package on NuGet.
[!NOTE] The
Apache.IoTDBpackage only supports versions greater than.net framework 4.6.1.
.NET SDK Version >= 5.0 .NET Framework >= 4.6.1
Users can quickly get started by referring to the use cases under the Apache-IoTDB-Client-CSharp-UserCase directory. These use cases serve as a useful resource for getting familiar with the client's functionality and capabilities.
For those who wish to delve deeper into the client's usage and explore more advanced features, the samples directory contains additional code samples.
.NET SDK Version >= 5.0 .NET Framework >= 4.6.1 ApacheThrift >= 0.14.1 NLog >= 4.7.9
This project uses dotnet format to enforce consistent code style based on the .editorconfig rules.
dotnet format --verify-no-changes
dotnet format
The CI pipeline will automatically check code formatting on all pull requests. Please ensure your code is properly formatted before submitting a PR.
You can find out how to publish from this doc.