-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity
Kratheon commentedon Sep 3, 2024
Hi,
You can try to create your own extension method using as a workaround Channels for buffers.
I was inspired by reading this stackOverflow ticket.
Of course the best long-term solution will be to create a new pull request and create another QueryAsyncEnumerable function that takes not generic type, will not convert the record and send it back instead.
QueryAsyncEnumerable()
now supportsFluxRecord
streaming #705