[jOOQ/jOOQ#9545] Parser cannot parse views with WITH
This commit is contained in:
parent
5ae89a4373
commit
6c60eb37d7
@ -1017,6 +1017,10 @@ final class ParserImpl implements Parser {
|
||||
return result;
|
||||
}
|
||||
|
||||
private static final Select<?> parseWithOrSelect(ParserContext ctx) {
|
||||
return peekKeyword(ctx, "WITH") ? (Select<?>) parseWith(ctx, true) : parseSelect(ctx, null, null);
|
||||
}
|
||||
|
||||
private static final SelectQueryImpl<Record> parseSelect(ParserContext ctx) {
|
||||
return parseSelect(ctx, null, null);
|
||||
}
|
||||
@ -2941,7 +2945,7 @@ final class ParserImpl implements Parser {
|
||||
}
|
||||
|
||||
parseKeyword(ctx, "AS");
|
||||
Select<?> select = parseSelect(ctx);
|
||||
Select<?> select = parseWithOrSelect(ctx);
|
||||
|
||||
if (fields.length > 0 && fields.length != select.getSelect().size())
|
||||
throw ctx.exception("Select list size (" + select.getSelect().size() + ") must match declared field size (" + fields.length + ")");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user