Skip to content

Releases: influxdata/influxdb-client-csharp

4.0.0-rc2

25 Feb 06:06
Compare
Choose a tag to compare

Migration Notice

  • New versions of QueryApi, QueryApiSync, WriteApi, WriteApiAsync and FluxClient methods uses default named argument values so you are able to easily migrate by:
- _client.GetQueryApi().QueryAsyncEnumerable<T>(fluxQuery, token);
+ _client.GetQueryApi().QueryAsyncEnumerable<T>(fluxQuery, cancellationToken: token);

Breaking Changes

API

  • Removed orgId argument from TelegrafsApi.GetRunsAsync methods
  • Change type of PermissionResource.Type to string. You are able to easily migrate by:
    - new PermissionResource { Type = PermissionResource.TypeEnum.Users, OrgID = _organization.Id }
    + new PermissionResource { Type = PermissionResource.TypeUsers, OrgID = _organization.Id }

Features

  1. #291: Add possibility to generate Flux query without pivot() function [LINQ]
  2. #289: Async APIs uses CancellationToken in all async methods
  3. #294: Optimize serialization PointData into LineProtocol

Bug Fixes

  1. #290: Change PermissionResource.Type to String
  2. #293: Type of CheckBase.LatestCompleted is DateTime

CI

  1. #292: Use new Codecov uploader for reporting code coverage

4.0.0-rc1

18 Feb 07:22
Compare
Choose a tag to compare

Breaking Changes

⚠️ The underlying RestSharp library was updated the latest major version v107. The new version of RestSharp switched from the legacy HttpWebRequest class to the standard well-known System.Net.Http.HttpClient instead. This improves performance and solves lots of issues, like hanging connections, updated protocols support, and many other problems.

API

  • The Client no longer supports the ReadWriteTimeout for HTTP Client. This settings is not supported by the HttpClient. Use can use Timeout property instead.

  • The FluxClient uses IDisposable interface to releasing underlying HTTP connections:

    From
    var client = FluxClientFactory.Create("http://localhost:8086/");
    To
    using var client = FluxClientFactory.Create("http://localhost:8086/");
  • The Query APIs uses CancellationToken instead of ICancellable:

    From
    await QueryApi.QueryAsync(flux, (cancellable, record) =>
    {
        // process record
        Console.WriteLine($"record: {record}");
    
        if (your_condition)
        {
            // cancel stream
            source.Cancel();
        }
    })
    To
    var source = new CancellationTokenSource();
    await QueryApi.QueryAsync(flux, record =>
    {
        // process record
        Console.WriteLine($"record: {record}");
    
        if (your_condition)
        {
            // cancel stream
            source.Cancel();
        }
    }, source.Token);
  • QueryApi has changed method signatures:

    3.3.0 4.0.0
    QueryAsync(String) QueryAsync(String, String?, CancellationToken?)
    QueryAsync(String, String) QueryAsync(String, String?, CancellationToken?)
    QueryAsync(Query) QueryAsync(Query, String?, CancellationToken?)
    QueryAsync(Query, String) QueryAsync(Query, String?, CancellationToken?)
    QueryAsync(String, Type) QueryAsync(String, Type, String?, CancellationToken?)
    QueryAsync(String, String, Type) QueryAsync(String, Type, String?, CancellationToken?)
    QueryAsync(Query, Type) QueryAsync(Query, Type, String?, CancellationToken?)
    QueryAsync(Query, String, Type) QueryAsync(Query, Type, String?, CancellationToken?)
    QueryAsync(String, Action<ICancellable, FluxRecord>) QueryAsync(String, Action<FluxRecord>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync(String, Action<ICancellable, FluxRecord>, Action<Exception>) QueryAsync(String, Action<FluxRecord>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync(String, Action<ICancellable, FluxRecord>, Action<Exception>, Action) QueryAsync(String, Action<FluxRecord>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync(String, String, Action<ICancellable, FluxRecord>) QueryAsync(String, Action<FluxRecord>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync(String, String, Action<ICancellable, FluxRecord>, Action<Exception>) QueryAsync(String, Action<FluxRecord>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync(String, String, Action<ICancellable, FluxRecord>, Action<Exception>, Action) QueryAsync(String, Action<FluxRecord>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync(Query, Action<ICancellable, FluxRecord>) QueryAsync(Query, Action<FluxRecord>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync(Query, Action<ICancellable, FluxRecord>, Action<Exception>) QueryAsync(Query, Action<FluxRecord>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync(Query, Action<ICancellable, FluxRecord>, Action<Exception>, Action) QueryAsync(Query, Action<FluxRecord>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync(Query, String, Action<ICancellable, FluxRecord>) QueryAsync(Query, Action<FluxRecord>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync(Query, String, Action<ICancellable, FluxRecord>, Action<Exception>) QueryAsync(Query, Action<FluxRecord>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync(Query, String, Action<ICancellable, FluxRecord>, Action<Exception>, Action) QueryAsync(Query, Action<FluxRecord>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync(String, String, Action<ICancellable, Object>, Action<Exception>, Action, Type) QueryAsync(String, Type, Action<Object>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync(Query, String, Action<ICancellable, Object>, Action<Exception>, Action, Type) QueryAsync(Query, Type, Action<Object>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync<T>(String) QueryAsync<T>(String, String?, CancellationToken?)
    QueryAsync<T>(String, String) QueryAsync<T>(String, String?, CancellationToken?)
    QueryAsync<T>(String, Action<ICancellable, T>) QueryAsync<T>(String, Action<T>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync<T>(String, Action<ICancellable, T>, Action<Exception>) QueryAsync<T>(String, Action<T>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync<T>(String, Action<ICancellable, T>, Action<Exception>, Action) QueryAsync<T>(String, Action<T>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync<T>(String, String, Action<ICancellable, T>) QueryAsync<T>(String, Action<T>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync<T>(String, String, Action<ICancellable, T>, Action<Exception>) QueryAsync<T>(String, Action<T>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync<T>(String, String, Action<ICancellable, T>, Action<Exception>, Action) QueryAsync<T>(String, Action<T>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync<T>(Query) QueryAsync<T>(Query, String?, CancellationToken?)
    QueryAsync<T>(Query, String) QueryAsync<T>(Query, String?, CancellationToken?)
    QueryAsync<T>(Query, Action<ICancellable, T>) QueryAsync<T>(Query, Action<T>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync<T>(Query, Action<ICancellable, T>, Action<Exception>) QueryAsync<T>(Query, Action<T>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync<T>(Query, Action<ICancellable, T>, Action<Exception>, Action) QueryAsync<T>(Query, Action<T>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync<T>(Query, String, Action<ICancellable, T>) QueryAsync<T>(Query, Action<T>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync<T>(Query, String, Action<ICancellable, T>, Action<Exception>) QueryAsync<T>(Query, Action<T>, Action<Exception>?, Action?, String?, CancellationToken?)
    QueryAsync<T>(Query, String, Action<ICancellable, T>, Action<Exception>, Action) `QueryAsync<...
Read more

v3.3.0

04 Feb 06:55
Compare
Choose a tag to compare

Bug Fixes

  1. #277: Add missing PermissionResources from Cloud API definition
  2. #281: Serialization query response into POCO with optional DateTime

3.2.0

26 Nov 07:37
Compare
Choose a tag to compare

Deprecates

  • InfluxDBClient.HealthAsync(): instead use InfluxDBClient.PingAsync()

Features

  1. #257: Add PingService to check status of OSS and Cloud instance
  2. #260: Changed internal to public visibility of InfluxDBClientOptions.Builder.ConnectionString
  3. #266: Add option to accept self-signed certificates

CI

  1. #264: Add build for dotnet6

Bug Fixes

  1. #262: InfluxDB 2.1 Incompatibility with Session Cookie

3.1.0

22 Oct 07:00
Compare
Choose a tag to compare

Features

  1. #239: Add support for Asynchronous queries [LINQ]
  2. #240: Add IsMeasurement option to Column attribute for dynamic measurement names in POCO classes
  3. #246, #251: Add support for deserialization of POCO column property types with a "Parse" method, such as Guid
  4. #249: Add support for LINQ Contains subqueries [LINQ]
  5. #256: Add support for Anonymous authentication - anonymous authentication is used if the user does not specify a token or an username with password

Dependencies

  1. #252: Update dependencies:
    • NUnit to 3.13.2
    • NUnit3TestAdapter to 4.0.0

3.0.0

17 Sep 06:40
Compare
Choose a tag to compare

Breaking Changes

Adds a Type overload for POCOs to QueryAsync. This will add object ConvertToEntity(FluxRecord, Type) to IFluxResultMapper

Features

  1. #232: Add a Type overload for POCOs to QueryAsync.
  2. #233: Add possibility to follow HTTP redirects

Bug Fixes

  1. #236: Mapping long type into Flux AST [LINQ]

2.1.0

20 Aug 06:05
Compare
Choose a tag to compare

Bug Fixes

  1. #221: Parsing infinite numbers
  2. #229: Fix cookie handling in session mode

Dependencies

  1. #222: Update dependencies:
    • RestSharp to 106.12.0

2.0.0

09 Jul 06:13
Compare
Choose a tag to compare

2.0.0 [2021-07-09]

Breaking Changes

This release introduces a support for new InfluxDB OSS API definitions - oss.yml. The following breaking changes are in underlying API services and doesn't affect common apis such as - WriteApi, QueryApi, BucketsApi, OrganizationsApi...

  • UsersService uses PostUser to create User
  • AuthorizationsService uses AuthorizationPostRequest to create Authorization
  • BucketsService uses PatchBucketRequest to update Bucket
  • OrganizationsService uses PostOrganizationRequest to create Organization
  • OrganizationsService uses PatchOrganizationRequest to update Organization
  • DashboardsService uses PatchDashboardRequest to update Dashboard
  • DeleteService is used to delete time series data instead of DefaultService
  • Run contains list of LogEvent in Log property
  • DBRPs contains list of DBRP in Content property
  • DBRPsService uses DBRPCreate to create DBRP
  • Inheritance structure:
    • Check <- CheckDiscriminator <- CheckBase
    • NotificationEndpoint <- NotificationEndpointDiscriminator <- NotificationEndpointBase
    • NotificationRule <- NotificationRuleDiscriminator <- NNotificationRuleBase
  • Flux AST literals extends the AST Expression object

Deprecates

  • AuthorizationsApi.CreateAuthorizationAsync(Authorization): instead use AuthorizationsApi.CreateAuthorizationAsync(AuthorizationPostRequest)

Features

  1. #206: Use optional args to pass query parameters into API list call - useful for the ability to use pagination.

API

  1. #206, #210, #211: Use InfluxDB OSS API definitions to generated APIs

Dependencies

  1. #209: Update dependencies:
    • CsvHelper to 27.1.0
    • Newtonsoft.Json 13.0.1
    • NodaTime to 3.0.5
    • NodaTime.Serialization.JsonNet to 3.0.0
    • Microsoft.Extensions.ObjectPool to 5.0.7

Documentation

  1. #213: API documentation is deployed to GitHub Pages

1.19.0

04 Jun 05:16
Compare
Choose a tag to compare

Features

  1. #194: Add possibility to handle HTTP response from InfluxDB server [write]
  2. #197: Optimize Flux Query for querying one time-series [LINQ]
  3. #205: Exponential random retry [write]

Bug Fixes

  1. #193: Create services without API implementation
  2. #202: Flux AST for Tag parameters which are not String [LINQ]

1.18.0

30 Apr 05:39
Compare
Choose a tag to compare

Features

  1. #184: Add possibility to specify WebProxy for Client
  2. #185: Use group() function in output Flux query. See details - Group function [LINQ]
  3. #186: Produce a typed HTTP exception
  4. #188: Switch pivot() and drop() function to achieve better performance

Bug Fixes

  1. #183: Propagate runtime exception to EventHandler