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: add supports for array expressions in query parameters #319

Merged
merged 2 commits into from
Aug 23, 2021

Conversation

bednar
Copy link
Contributor

@bednar bednar commented Aug 23, 2021

Closes #318

Proposed Changes

Add supports for array in query parameters. Following queries are now supported:

query_api.query('''
from(bucket: "my-bucket")
  |> range(start: -6h, stop: now())
  |> filter(fn: (r) => contains(value: r.location, set: bars))
  |> last()
''', params={"bars": ["Prague", "Berlin", "Rome"]})

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • pytest tests completes successfully
  • Commit messages are in semantic format
  • Sign CLA (if not already signed)

@codecov-commenter
Copy link

codecov-commenter commented Aug 23, 2021

Codecov Report

Merging #319 (43d34d9) into master (eb7d52e) will decrease coverage by 0.02%.
The diff coverage is 96.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #319      +/-   ##
==========================================
- Coverage   92.55%   92.53%   -0.03%     
==========================================
  Files          27       27              
  Lines        2204     2211       +7     
==========================================
+ Hits         2040     2046       +6     
- Misses        164      165       +1     
Impacted Files Coverage Δ
influxdb_client/client/query_api.py 98.27% <96.15%> (-0.81%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eb7d52e...43d34d9. Read the comment docs.

@bednar bednar requested a review from rhajek August 23, 2021 06:10
@bednar bednar marked this pull request as ready for review August 23, 2021 06:10
@bednar bednar merged commit e2d7911 into master Aug 23, 2021
@bednar bednar deleted the feat/query-params-array branch August 23, 2021 07:37
@bednar bednar added this to the 1.21.0 milestone Aug 23, 2021
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.

Support for Python Lists as a query parameter
3 participants