influxdb-client-csharp
influxdb-client-csharp copied to clipboard
Streaming IAsyncEnumerable<FluxRecord> and IAsyncEnumerable<string>
Proposal/Current behavior:
Current IQueryApi
doesn't allow for streaming raw results, i.e., results of type FluxRecord
or string
.
Desired behavior:
IAsyncEnumerable<T> QueryAsyncEnumerable<T>(string query, string org = null, CancellationToken cancellationToken = default(CancellationToken));
IAsyncEnumerable<T> QueryAsyncEnumerable<T>(Query query, string org = null, CancellationToken cancellationToken = default(CancellationToken));
When T
is string
or FluxRecord
don't map the result to POCO.
Alternatives considered:
Add new methods that return IAsyncEnumerable<string>
and IAsyncEnumerable<FluxRecord>
.
Use case: Current methods with delegates are not flexible enought (e.g. callbacks cannot use async code). Also its not always desired to map to POCO from performance reasons.