Allow GROUP BY
queries by providing deserialize_next_tagged
to deserialize the group fields
#69
+196
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This change adds deserialisation for the metadata of a
GROUP BY
using the methoddeserialize_next_tagged
, which takes aTAG
parameter (so called because that's what the InfluxDB response calls it) which is deserialized from the metadata. BecauseSeries
has a custom deserializer, this meansTaggedSeries
also has to. It's pretty copy paste, with minimal code changes, and leverages the existingSeries
value deserialisation. I originally tried to abstract over having tags and not but it ended up being way hairier and more error prone, so I thought copying ~100 lines of boilerplate is probably fine.I've tested this on my code and it works fine. I also added a test and that passes.
Side note, is the
#[doc(hidden)]
something that can be removed? The user has to use that struct to access the series.Checklist
cargo fmt --all
cargo clippy --all-targets --all-features -- -D warnings
cargo readme -r influxdb -t ../README.tpl > README.md