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 FluxRecord.row with response data stored in Array #131

Merged
merged 6 commits into from
Oct 10, 2022

Conversation

michaelahojna
Copy link
Contributor

@michaelahojna michaelahojna commented Oct 7, 2022

Proposed Changes

Adding possibility of accessing response data in Array FluxRecord.row.

In case of using pivot on data, where field contains labels that occur by default in the annotated CSV (f.e. "result" or "table"), could be duplicated column names in response. In that case FluxRecord.values, which hold only unique keys, doesn't show complete data. This edge case is solved by using FluxRecord.row.

Checklist

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

@michaelahojna michaelahojna marked this pull request as ready for review October 7, 2022 11:26
@michaelahojna michaelahojna requested a review from bednar October 7, 2022 11:26
Copy link
Contributor

@bednar bednar left a comment

Choose a reason for hiding this comment

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

Thanks for your PR 👍
There are a few requirements that must be be satisfy before we accept the PR:

examples/RecordRowExample.php Outdated Show resolved Hide resolved
examples/RecordRowExample.php Outdated Show resolved Hide resolved
examples/RecordRowExample.php Outdated Show resolved Hide resolved
examples/RecordRowExample.php Outdated Show resolved Hide resolved
@michaelahojna michaelahojna requested a review from bednar October 7, 2022 12:54
src/InfluxDB2/FluxCsvParser.php Outdated Show resolved Hide resolved
@michaelahojna michaelahojna requested a review from bednar October 10, 2022 09:11
src/InfluxDB2/FluxCsvParser.php Outdated Show resolved Hide resolved
@michaelahojna michaelahojna requested a review from bednar October 10, 2022 17:20
@codecov-commenter
Copy link

Codecov Report

Base: 74.67% // Head: 74.93% // Increases project coverage by +0.25% 🎉

Coverage data is based on head (bf89298) compared to base (8b21fdc).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #131      +/-   ##
============================================
+ Coverage     74.67%   74.93%   +0.25%     
- Complexity      421      424       +3     
============================================
  Files            25       25              
  Lines          1082     1093      +11     
============================================
+ Hits            808      819      +11     
  Misses          274      274              
Impacted Files Coverage Δ
src/InfluxDB2/FluxCsvParser.php 100.00% <100.00%> (ø)
src/InfluxDB2/FluxRecord.php 64.70% <100.00%> (+1.06%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@bednar bednar left a comment

Choose a reason for hiding this comment

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

LGTM 🌹

@bednar bednar merged commit 567fd94 into master Oct 10, 2022
@bednar bednar deleted the record-row branch October 10, 2022 17:58
@bednar bednar added this to the 3.1.0 milestone Oct 10, 2022
peynman pushed a commit to peynman/influxdb-client-php that referenced this pull request Mar 7, 2023
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