How do I reference Postgres constraints in j00q?

Lee Crabtree :

Using jooq 3.11.8, referencing a constraint in an onConflictOnConstraint is not particularly discoverable, and the documentation is exactly no help. I know the name of the constraint, but onConflictOnConstraint doesn't take a String.

Specifically:

ctx.insertInto(
  TABLE,
  TABLE.ID,
  TABLE.FIELD1
)
.values(
  id,
  value
)
.onConflictOnConstraint(/* WHAT GOES HERE? */)
.doUpdate()
.set(TABLE.FIELD1, value)
.execute();

What am I missing?

Lukas Eder :

There are 3 overloads of this method:

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=145187&siteId=1