Skip to content

Commit

Permalink
[#7171] Support parsing ON CONFLICT DO (no constraint specification)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaseder committed Mar 9, 2018
1 parent dd2e6ad commit 3dcb320
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions jOOQ/src/main/java/org/jooq/impl/ParserImpl.java
Expand Up @@ -1203,13 +1203,15 @@ else if (parseKeywordIf(ctx, "CONFLICT")) {
if (parseKeywordIf(ctx, "ON CONSTRAINT")) {
doUpdate = onDuplicate.onConflictOnConstraint(parseName(ctx));
}
else {
parse(ctx, '(');
else if (parseIf(ctx, '(')) {
doUpdate = onDuplicate.onConflict(parseFieldNames(ctx));
parse(ctx, ')');
}
parseKeyword(ctx, "DO");
else {
doUpdate = onDuplicate.onConflict();
}

parseKeyword(ctx, "DO");
if (parseKeywordIf(ctx, "NOTHING")) {
returning = doUpdate.doNothing();
}
Expand Down

0 comments on commit 3dcb320

Please sign in to comment.