pgjdbc / r2dbc-postgresql

Postgresql R2DBC Driver

Home Page:https://r2dbc.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make `CodecMetadata.getDataTypes()` more flexible

skykatik opened this issue · comments

commented

Feature Request

Is your feature request related to a problem? Please describe

I was making my own codec and noticed that CodecMetadata.getDataTypes() does not allow to return subtypes of PostgresTypeIdentifier (like a PostgresqlObjectId) when they are cached in static fields .

Describe the solution you'd like

Change return type of method to covariant, i.e. Iterable<? extends PostgresTypeIdentifier>.

Teachability, Documentation, Adoption, Migration Strategy

That method is already designed to return any type of iterable, and usages of it related to read, so therefore, there will be no problems with the existing code

Good catch, we can easily do that.

For the time being, I suggest casting to work around that limitation.