Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: query parameters #88

Merged
merged 9 commits into from
May 13, 2024
Merged

feat: query parameters #88

merged 9 commits into from
May 13, 2024

Conversation

bednar
Copy link
Member

@bednar bednar commented May 3, 2024

Proposed Changes

  1. Added support for named query parameters:
from influxdb_client_3 import InfluxDBClient3

with InfluxDBClient3(host="https://us-east-1-1.aws.cloud2.influxdata.com",
                     token="my-token",
                     database="my-database") as client:

    table = client.query("select * from cpu where host=$host", query_parameters={"host": "server01"})

    print(table.to_pandas())
  1. Added simple write-query integration tests

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)

Copy link

codecov bot commented May 3, 2024

Codecov Report

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

Project coverage is 7.01%. Comparing base (6cf2b3e) to head (434502a).
Report is 1 commits behind head on main.

Files Patch % Lines
influxdb_client_3/__init__.py 0.00% 13 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main     #88      +/-   ##
========================================
+ Coverage   2.11%   7.01%   +4.89%     
========================================
  Files         34      38       +4     
  Lines       2080    2196     +116     
========================================
+ Hits          44     154     +110     
- Misses      2036    2042       +6     

☔ 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 May 3, 2024 12:48
@bednar bednar requested a review from karel-rehor May 3, 2024 12:48
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 for me locally. Changes and new tests all make sense.

@bednar bednar added this to the 0.4.0 milestone May 13, 2024
@bednar bednar merged commit 4293f91 into main May 13, 2024
14 checks passed
@bednar bednar deleted the query-parameters branch May 13, 2024 12:38
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.

2 participants