[#8174] Add support for WHILE loops in procedural blocks
This commit is contained in:
parent
d6fb110901
commit
6b6a2ea602
@ -51,6 +51,7 @@ proceduralStatement =
|
||||
| declareStatement
|
||||
| assignmentStatement
|
||||
| ifStatement
|
||||
| whileStatement
|
||||
| nullStatement
|
||||
;
|
||||
|
||||
@ -80,6 +81,10 @@ ifStatement =
|
||||
'END IF'
|
||||
;
|
||||
|
||||
whileStatement =
|
||||
'WHILE' condition 'LOOP' proceduralStatements 'END LOOP'
|
||||
;
|
||||
|
||||
nullStatement = 'NULL'
|
||||
;
|
||||
|
||||
|
||||
@ -221,6 +221,7 @@ import org.jooq.InsertValuesStep9;
|
||||
import org.jooq.InsertValuesStepN;
|
||||
import org.jooq.Keyword;
|
||||
// ...
|
||||
// ...
|
||||
import org.jooq.Merge;
|
||||
import org.jooq.MergeKeyStep1;
|
||||
import org.jooq.MergeKeyStep10;
|
||||
@ -9794,6 +9795,15 @@ public class DSL {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -302,6 +302,7 @@ final class Keywords {
|
||||
static final Keyword K_VIEW = keyword("view");
|
||||
static final Keyword K_WHEN = keyword("when");
|
||||
static final Keyword K_WHERE = keyword("where");
|
||||
static final Keyword K_WHILE = keyword("while");
|
||||
static final Keyword K_WINDOW = keyword("window");
|
||||
static final Keyword K_WITH = keyword("with");
|
||||
static final Keyword K_WITH_CHECK_OPTION = keyword("with check option");
|
||||
|
||||
@ -260,6 +260,7 @@ import static org.jooq.impl.DSL.varPop;
|
||||
import static org.jooq.impl.DSL.varSamp;
|
||||
import static org.jooq.impl.DSL.week;
|
||||
import static org.jooq.impl.DSL.when;
|
||||
import static org.jooq.impl.DSL.while_;
|
||||
import static org.jooq.impl.DSL.year;
|
||||
import static org.jooq.impl.DSL.zero;
|
||||
import static org.jooq.impl.Keywords.K_DELETE;
|
||||
@ -2275,6 +2276,16 @@ final class ParserImpl implements Parser {
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
||||
break;
|
||||
|
||||
case 'w':
|
||||
case 'W':
|
||||
if (peekKeyword(ctx, "WHILE") && ctx.requireProEdition())
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
||||
break;
|
||||
@ -2369,6 +2380,15 @@ final class ParserImpl implements Parser {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user