influxdata / influxdb-client-php

InfluxDB (v2+) Client Library for PHP
https://influxdata.github.io/influxdb-client-php/
MIT License
151 stars 47 forks source link

feat: add FluxRecord.row with response data stored in Array #131

Closed michaelahojna closed 2 years ago

michaelahojna commented 2 years ago

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

codecov-commenter commented 2 years ago

Codecov Report

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

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 ```diff @@ 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](https://codecov.io/gh/influxdata/influxdb-client-php/pull/131?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=influxdata) | Coverage Δ | | |---|---|---| | [src/InfluxDB2/FluxCsvParser.php](https://codecov.io/gh/influxdata/influxdb-client-php/pull/131/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=influxdata#diff-c3JjL0luZmx1eERCMi9GbHV4Q3N2UGFyc2VyLnBocA==) | `100.00% <100.00%> (ø)` | | | [src/InfluxDB2/FluxRecord.php](https://codecov.io/gh/influxdata/influxdb-client-php/pull/131/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=influxdata#diff-c3JjL0luZmx1eERCMi9GbHV4UmVjb3JkLnBocA==) | `64.70% <100.00%> (+1.06%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=influxdata). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=influxdata)

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