Closed robbydf closed 3 years ago
quick question, do you have to provide the forcedType even if you add the configuration into the jooq code gen plugin?
like:
<forcedTypes>
<forcedType>
<name>BOOLEAN</name>
<expression>.*\.ENABLED|.*\.USE_CLIENT_LOCATION</expression>
</forcedType>
</forcedTypes>
The root cause is that JOOQ and r2dbc-postgresql have different data classes.
I am not sure about your solution. This will only work for a small subset of types as the underlying r2dbc codec must support them. For example you can force to convert org.jooq.JSONB
to String but probably not to something else. That's why I do not think it is good to provide an interface to set arbitrary "forced types" when only one or two will work.
Furthermore your solution only works for reading data (SELECT
) and not for writing data (INSERT
, UPDATE
).
A solution could be to introduce concrete adapters between types of JOOQ and R2DBC drivers. In the next release there will be a Converter
class and default JSON/JSONB support. You can replace the default converter via dslContext.configuration().data("converter", yourConverter)
.
Closed in favor of solution in release 0.3.0
Ignored Eclipse IDE files Specified the maven-javadoc-plugin to treat the sources as Java 8