Skip to content

Introduce fast-path handling for decoding primitive values #662

Closed
@mp911de

Description

@mp911de

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions