Hello Lukas,

In our Oracle->PG migration, we are using JOOQ's ParsingConnection to 
translate between dialects.

Similar to https://github.com/jOOQ/jOOQ/issues/11757,  we are facing issues 
with Oracle's NULL and empty string equivalence.
The assumption is prelevant across the codebase as we have a lot of code 
that expects setString('', i) to be nullified.
This is especially problematic when done on FK columns, as pg would 
complain for violating it (otherwise I wouldn't have found out about this 
haha).

The first straight-forward solution on our side is to add empty checks 
everywhere, but I am trying to avoid this path for obvious reasons.
I wonder if JOOQ  could do something about this, or if there is an 
equivalent to ParseListener for binding that would allow more flexibility 
in that area.

jooq version : 3.19.6
target sql dialect : POSTGRES_12
settings : 
Settings settings = new Settings()
.withParseDialect(SQLDialect.ORACLE)
.withParseUnknownFunctions(ParseUnknownFunctions.IGNORE)
.withTransformTableListsToAnsiJoin(true) // transform (+) to left outer join
.withTransformUnneededArithmeticExpressions(TransformUnneededArithmeticExpressions.ALWAYS)
.withTransformRownum(Transformation.ALWAYS)
.withParamType(ParamType.INLINED)
.withParamCastMode(ParamCastMode.DEFAULT)
.withRenderOptionalAsKeywordForFieldAliases(RenderOptionalKeyword.ON)
.withRenderOptionalAsKeywordForTableAliases(RenderOptionalKeyword.ON)
.withRenderQuotedNames(RenderQuotedNames.EXPLICIT_DEFAULT_UNQUOTED)
.withRenderNameCase(RenderNameCase.UPPER)
.withRenderCoalesceToEmptyStringInConcat(true);

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jooq-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/60920cfc-5e40-4cfe-abff-c8831817b304n%40googlegroups.com.

Reply via email to