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

Implement @RegisterCollector with tests and short doc #2377

Merged
merged 4 commits into from Jun 14, 2023

Conversation

stevenschlansker
Copy link
Member

I took the PR and hopefully got it over the finish line with a test and some simple docs.
Bonus fix: try to use the Collector's declared element type, so that you may collect into things that aren't Iterables.

Fixes #2357

@stevenschlansker
Copy link
Member Author

cc @TheRealRyGuy

@TheRealRyGuy
Copy link
Contributor

TheRealRyGuy commented Jun 9, 2023

thank you so much, have had no time lately

my only thought that I was hopefully gonna get around to - would it be better to use a CollectorSupplier kind of class in the annotation?
Allows for shorthand Collector.of and Collectors usage, while still allowing for Collector inheritance, feels better for QoL

@sonarcloud
Copy link

sonarcloud bot commented Jun 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@@ -4636,7 +4636,14 @@ the `User.id` and `User.name` fields. Likewise for `r_id` and `r_name` into the
The link:{jdbidocs}/sqlobject/config/RegisterConstructorMapper.html[@RegisterConstructorMapper^] annotation may be repeated multiple times on
the same type or method to register multiple constructor mappers.

==== @RegisterCollectorFactory
Copy link
Contributor

Choose a reason for hiding this comment

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

RegisterCollector ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this would be a better fit after @UseRowReducer. The docs are so bare bones that, without an example, this will probably not find any users.

@hgschmie
Copy link
Contributor

I will merge this and then fix the docs.

@hgschmie hgschmie merged commit 12f32ef into master Jun 14, 2023
46 checks passed
@hgschmie hgschmie deleted the registercollector branch June 14, 2023 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants