Skip to content

Conversation

@bednar
Copy link
Member

@bednar bednar commented Jan 9, 2024

Proposed Changes

This PR add supports for named parameters in the query API:

using var client = new InfluxDBClient("http://localhost:8086", token: "my-token", organization: "my-org", database: "my-database");

var results = client.QueryPoints(
    query: "SELECT a, b, c FROM my_table WHERE id = $id AND name = $name",
    namedParameters: new Dictionary<string, object> { { "id", 1 }, { "name", "test" } }
);

How looks like gRPC request to IOx: https://github.com/influxdata/influxdb_iox/blob/4aa8341cdd3d10c1b4ead723d0c2781e5fd8094d/service_grpc_flight/src/request.rs#L107

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • Tests pass
  • Commit messages are conventional
  • Sign CLA (if not already signed)

@codecov
Copy link

codecov bot commented Jan 9, 2024

Codecov Report

Attention: Patch coverage is 97.87234% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 95.59%. Comparing base (cb5e4a8) to head (08d5a7e).

Files Patch % Lines
Client/Internal/FlightSqlClient.cs 97.14% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
+ Coverage   95.47%   95.59%   +0.11%     
==========================================
  Files          12       12              
  Lines        1017     1044      +27     
  Branches      127      130       +3     
==========================================
+ Hits          971      998      +27     
  Misses         11       11              
  Partials       35       35              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bednar bednar marked this pull request as ready for review February 26, 2024 08:33
@bednar bednar requested a review from karel-rehor February 26, 2024 08:33
@bednar bednar added this to the 0.5.0 milestone Feb 29, 2024
Copy link
Contributor

@karel-rehor karel-rehor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests pass. Examples work. Everything else looks OK.

@bednar bednar merged commit 6ce3064 into main Mar 1, 2024
@bednar bednar deleted the named-parameters branch March 1, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants