r2dbc-h2 icon indicating copy to clipboard operation
r2dbc-h2 copied to clipboard

Add support of custom codec registration

Open rchigvintsev opened this issue 4 years ago • 4 comments

Feature Request

Problem

I use simple custom codec to map Java enumeration name to VARCHAR in case of PostgreSQL database. I register it with implementation of io.r2dbc.postgresql.extension.CodecRegistrar. When I use H2 in-memory database to perform integration testing it is not possible to register the similar codec as easy as for PostgresSQL.

Solution

Maybe it would be nice to migrate extension mechanism from r2dbc-postgresql repository to this project.

rchigvintsev avatar Nov 24 '20 15:11 rchigvintsev

Any plan on this?

alpeshvas avatar Jul 10 '22 12:07 alpeshvas

@lukaseder Could we change visibility (currently it's package protected) of AbstractCodec ? So that we can implement custom codecs and provide them through H2ConnectionFactoryProvider. Adding registrar support could take time.

alpeshvas avatar Jul 10 '22 13:07 alpeshvas

I'm the wrong guy to ask here

lukaseder avatar Jul 11 '22 09:07 lukaseder

I'm the wrong guy to ask here Okay, tagging original authors of the file

@nebhale @gregturn

alpeshvas avatar Jul 11 '22 12:07 alpeshvas