Skip to content

Commit

Permalink
[#7171] Don't show INS, UPD, DEL, SEL in error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaseder committed May 2, 2018
1 parent 883029a commit 85581e6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions jOOQ/src/main/java/org/jooq/impl/ParserImpl.java
Expand Up @@ -979,8 +979,8 @@ private static final SelectQueryImpl<Record> parseQueryPrimary(ParserContext ctx
return (SelectQueryImpl<Record>) ctx.dsl.selectQuery(parseTableValueConstructor(ctx));

ctx.ignoreHints(false);
if (!parseKeywordIf(ctx, "SELECT"))
parseKeyword(ctx, "SEL");
if (!parseKeywordIf(ctx, "SEL"))
parseKeyword(ctx, "SELECT");

String hints = parseHints(ctx);
boolean distinct = parseKeywordIf(ctx, "DISTINCT") || parseKeywordIf(ctx, "UNIQUE");
Expand Down Expand Up @@ -1343,8 +1343,8 @@ else if (parseKeywordIf(ctx, "FOLLOWING"))
}

private static final Delete<?> parseDelete(ParserContext ctx, WithImpl with) {
if (!parseKeywordIf(ctx, "DELETE"))
parseKeyword(ctx, "DEL");
if (!parseKeywordIf(ctx, "DEL"))
parseKeyword(ctx, "DELETE");

parseKeywordIf(ctx, "FROM");
Table<?> tableName = parseTableName(ctx);
Expand All @@ -1366,8 +1366,8 @@ private static final Delete<?> parseDelete(ParserContext ctx, WithImpl with) {
}

private static final Insert<?> parseInsert(ParserContext ctx, WithImpl with) {
if (!parseKeywordIf(ctx, "INSERT"))
parseKeyword(ctx, "INS");
if (!parseKeywordIf(ctx, "INS"))
parseKeyword(ctx, "INSERT");

parseKeyword(ctx, "INTO");
Table<?> tableName = parseTableName(ctx);
Expand Down Expand Up @@ -1486,8 +1486,8 @@ else if (parseKeywordIf(ctx, "UPDATE SET")) {
}

private static final Update<?> parseUpdate(ParserContext ctx, WithImpl with) {
if (!parseKeywordIf(ctx, "UPDATE"))
parseKeyword(ctx, "UPD");
if (!parseKeywordIf(ctx, "UPD"))
parseKeyword(ctx, "UPDATE");

Table<?> tableName = parseTableName(ctx);
UpdateSetFirstStep<?> s1 = (with == null ? ctx.dsl.update(tableName) : with.update(tableName));
Expand Down

0 comments on commit 85581e6

Please sign in to comment.