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!

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/6003017a-6d51-41b4-a30d-3d2a74bf48d3n%40googlegroups.com.

Reply via email to