Skip to content

Streaming IAsyncEnumerable<FluxRecord> and IAsyncEnumerable<string> #452

Open
@adambajguz

Description

@adambajguz

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

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions