2015-01-07 14:33 GMT+01:00 Kristoffer Sjögren <[email protected]>:
> Thanks for the tips Lukas.
>
> After looking more closely I can see that the JOOQ code seems to do the
> right thing actually. It more looks like the DB may have problems with
> PreparedStatements.
>
Interesting, what database are you using?
> But as a workaround a prerolled statement like this will work.
>
> con.createStatement().execute("UPSERT into TABLE (A, B, C) values (1, 2,
> 3)");
>
> Is it possible to create such a query using JOOQ records?
>
You can specify the jOOQ Settings to generate
StatementType.STATIC_STATEMENT. An example is also given on this page:
http://www.jooq.org/doc/latest/manual/sql-building/dsl-context/custom-settings
The effect is that all bind values will be escaped and inlined by jOOQ, and
only "static" java.sql.Statements are executed, as opposed to
PreparedStatements.
--
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/d/optout.