[#5955] Support Informix SKIP m FIRST n syntax

This commit is contained in:
lukaseder 2017-03-25 21:10:45 +01:00
parent d2512c9d14
commit 63becdec46

View File

@ -588,6 +588,7 @@ class ParserImpl implements Parser {
if (!distinct)
parseKeywordIf(ctx, "ALL");
// T-SQL style TOP .. START AT
if (parseKeywordIf(ctx, "TOP")) {
limit = parseUnsignedInteger(ctx);
@ -595,6 +596,17 @@ class ParserImpl implements Parser {
offset = parseUnsignedInteger(ctx);
}
// Informix style SKIP .. FIRST
else if (parseKeywordIf(ctx, "SKIP")) {
offset = parseUnsignedInteger(ctx);
if (parseKeywordIf(ctx, "FIRST"))
limit = parseUnsignedInteger(ctx);
}
else if (parseKeywordIf(ctx, "FIRST")) {
limit = parseUnsignedInteger(ctx);
}
List<Field<?>> select = parseSelectList(ctx);
List<Table<?>> from = null;
Condition startWith = null;