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

Encode/Decode of other Java 8 DateTime types #591

Open
hantsy opened this issue Mar 20, 2023 · 2 comments
Open

Encode/Decode of other Java 8 DateTime types #591

hantsy opened this issue Mar 20, 2023 · 2 comments
Labels
status: ideal-for-contribution An issue that a contributor can help us with type: enhancement A general enhancement

Comments

@hantsy
Copy link

hantsy commented Mar 20, 2023

I tried to use Year type(INT in the db column) in my projects(Spring Boot 3.0.4, R2dbc 1.0, Postgres R2dbc 1.0.1.RELEASE), and got the following exception when run repository test against a Postgres testcontainers instance:

java.lang.IllegalArgumentException: Cannot encode parameter of type java.time.Year (2023)

I think all missing Java 8 DateTime types should be supported in Postgres R2dbc drivers.

  • Year
  • Month
  • DayOfWeek
  • DayOfMonth
  • YearMonth
  • etc.
@hantsy hantsy added the type: enhancement A general enhancement label Mar 20, 2023
@mp911de mp911de added the status: ideal-for-contribution An issue that a contributor can help us with label Mar 20, 2023
@mp911de
Copy link
Collaborator

mp911de commented Mar 20, 2023

Feel free to submit a pull request.

steverigney added a commit to steverigney/r2dbc-postgresql that referenced this issue Aug 27, 2023
steverigney added a commit to steverigney/r2dbc-postgresql that referenced this issue Aug 27, 2023
steverigney added a commit to steverigney/r2dbc-postgresql that referenced this issue Aug 27, 2023
steverigney added a commit to steverigney/r2dbc-postgresql that referenced this issue Aug 27, 2023
steverigney added a commit to steverigney/r2dbc-postgresql that referenced this issue Aug 27, 2023
steverigney added a commit to steverigney/r2dbc-postgresql that referenced this issue Aug 27, 2023
steverigney added a commit to steverigney/r2dbc-postgresql that referenced this issue Aug 27, 2023
steverigney added a commit to steverigney/r2dbc-postgresql that referenced this issue Aug 27, 2023
steverigney added a commit to steverigney/r2dbc-postgresql that referenced this issue Aug 27, 2023
steverigney added a commit to steverigney/r2dbc-postgresql that referenced this issue Aug 27, 2023
steverigney added a commit to steverigney/r2dbc-postgresql that referenced this issue Sep 2, 2023
@reneleonhardt
Copy link

@hantsy Nice addition, does it work, can you rearrange the code to minimize the diff? getDefaultCodecs() seems to be mostly the same, but is shown as a complete replacement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ideal-for-contribution An issue that a contributor can help us with type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants