-
Notifications
You must be signed in to change notification settings - Fork 36
Add EnumCodec #34
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
Add EnumCodec #34
Conversation
|
@essentinal Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
|
@essentinal Thank you for signing the Contributor License Agreement! |
|
Looks good from a cursory review. We should not add any other functionality beyond that. Using an |
|
If we do this here, it seems like we'd need the same thing in every r2dbc driver. The purpose of this is to translate a Java Frankly, this sounds like a feature better implemented at the client level ( Whether such a feature on the client level would require any SPI changes, I'm not sure I see that (yet). |
|
Reiterating on that topic, I'm also inclined to not provide an enum codec. If we would include that type of codecs in all drivers, then we would basically expect all drivers to ship with an enum codec to reduce variance amongst vendor-specifics. With R2DBC we intend to reduce the number of things each driver has to implement and enum codec falls in that category which would be provided by a driver with the same mapping ( @nebhale Thoughts? |
|
We discussed this topic in our team and concluded that enum support is a application-specific feature that would be implemented in the driver. Drivers only encapsulate database-specific feature. Mapping an enum name to a character column is not database-specific but rather an opinionated convenience feature. Therefore, we decided to not include Thanks for all your effort! |
|
Which maven version has this bug fixes ? |
|
Enum codecs are not supported as per comment in this ticket. |
For now I suggest to add a simple EnumCodec, since it solves my issue.
Fixes #33