Hi,
we are currently using an (very) old version of jooq (3.11.12) because of underlying Java Version issues and currently we are facing an issue with escaping values containing one or more ' (apostrophes):
The SQL dialect is set to MYSQL (which usually should automatically activate BackslashEscaping). However it seems that the code still produces double apostrophes for escaping (''). Does anyone faced a similar issue and can give us a hint what could be the root cause?
Here is the code part we are where we see the issue when using an apostroph within the set of values (e.g.: "ABC'DEF")
List<Object> sqlValues = values.stream()
.map(v -> sqlField.getDataType().convert(v))
.collect(Collectors.toList());
// create the JOOQ condition
Condition valueCondition = sqlField.in(sqlValues);
When evaluating the valueCondition we see that the included sqlValues contains "ABC''DEF" instead of "ABC\'DEF".
If you need more information, please let me know :)
Thanks in advance for your help!