2014-02-05 <[email protected]>:

> Thanks for the prompt reply Lukas!
>
> This happens in the context of inserting a record using the JOOQ
> code-generated classes for Tables and Records:
> Table<Record> table = ...
> InsertQuery<Record> insertQuery = context.insertQuery(table);
> MyRecord record = new MyRecord();
> record.setName("$zLmv$*it's*$zLmv"); // name is the column name in table
> insertQuery.addRecord(record);
>
> The SQL is got from JOOQ and executed independently:
> String sql = insertQuery.getSQL(ParamType.INLINED);
> ... execute SQL ...
>
> How does the suggestions related to CustomField or Param listener apply in
> this context?
>

You'd need to go through the "regular" jOOQ insert DSL API:

DSL.using(configuration)

   .insertInto(MY_TABLE, MY_TABLE.NAME)

   .values(new MyCustomBindValue("$zLmv$it's$zLmv$"))

   .execute();

... and MyCustomBindValue would be a CustomField. I haven't tried this,
it's just an idea. But then again, why not rely on jOOQ correctly quoting
apostrophes?

-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to