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

Introduce fast-path handling for decoding primitive values #662

Closed
mp911de opened this issue Sep 27, 2024 · 0 comments
Closed

Introduce fast-path handling for decoding primitive values #662

mp911de opened this issue Sep 27, 2024 · 0 comments
Labels
type: enhancement A general enhancement
Milestone

Comments

@mp911de
Copy link
Collaborator

mp911de commented Sep 27, 2024

Right now, PostgresqlRow.get(…) leads to an exception when trying to decode primitive values regardless of whether the value is present or absent. It would be good to handle primitive value decoding in a lenient way and only throw an exception if the value is absent and therefore, cannot be represented.

java.lang.IllegalArgumentException: Cannot decode value of type int with OID 23
        at io.r2dbc.postgresql.codec.DefaultCodecs.decode(DefaultCodecs.java:236)
        at io.r2dbc.postgresql.PostgresqlRow.decode(PostgresqlRow.java:115)
        at io.r2dbc.postgresql.PostgresqlRow.get(PostgresqlRow.java:86)
        at org.springframework.r2dbc.core.BeanPropertyRowMapper.getItemValue(BeanPropertyRowMapper.java:241)
@mp911de mp911de added the type: enhancement A general enhancement label Sep 27, 2024
@mp911de mp911de added this to the 1.0.6.RELEASE milestone Oct 2, 2024
@mp911de mp911de closed this as completed Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant