influxdata / influxdb-java

Java client for InfluxDB
MIT License
1.19k stars 478 forks source link

Default column name to pojo field name, and add `allFields` mode to `Measurement` annotation #972

Closed eranl closed 1 year ago

eranl commented 1 year ago

if @Column is used without a name, the annotated field's name is used as the column name.

In addition, when a pojo is annotated with @Measurement(name = "...", allFields = true), then all its fields are loaded or saved. Finally, an @Exclude annotation can be used for opting a field out in this mode.

Fixes #971.

codecov-commenter commented 1 year ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (d3a7bbc) 61.22% compared to head (32d31ac) 61.28%.

:exclamation: Current head 32d31ac differs from pull request most recent head aeaba32. Consider uploading reports for the commit aeaba32 to get more accurate results

Files Patch % Lines
src/main/java/org/influxdb/dto/Point.java 81.81% 0 Missing and 2 partials :warning:
...n/java/org/influxdb/impl/InfluxDBResultMapper.java 88.88% 0 Missing and 1 partial :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #972 +/- ## ============================================ + Coverage 61.22% 61.28% +0.06% - Complexity 443 450 +7 ============================================ Files 70 70 Lines 2579 2591 +12 Branches 271 277 +6 ============================================ + Hits 1579 1588 +9 Misses 932 932 - Partials 68 71 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

majst01 commented 1 year ago

Nice PR, thanks for you contribution, can you please also add a bit of documentation of you new features, best place would be here.

If this is done, i am happy to merge

eranl commented 1 year ago

can you please also add a bit of documentation of you new features, best place would be here.

Updated. Please review.