diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/grammar-3.12.txt b/jOOQ-manual/src/main/resources/org/jooq/web/grammar-3.12.txt index 2e62ac7afe..106459d249 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/grammar-3.12.txt +++ b/jOOQ-manual/src/main/resources/org/jooq/web/grammar-3.12.txt @@ -52,6 +52,7 @@ proceduralStatement = | assignmentStatement | ifStatement | whileStatement +| exitStatement | nullStatement ; @@ -85,6 +86,10 @@ whileStatement = 'WHILE' condition 'LOOP' proceduralStatements 'END LOOP' ; +exitStatement = + 'EXIT' [ 'WHEN' condition ] +; + nullStatement = 'NULL' ; diff --git a/jOOQ/src/main/java/org/jooq/Loop.java b/jOOQ/src/main/java/org/jooq/Loop.java new file mode 100644 index 0000000000..8ba00725c8 --- /dev/null +++ b/jOOQ/src/main/java/org/jooq/Loop.java @@ -0,0 +1,62 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Other licenses: + * ----------------------------------------------------------------------------- + * Commercial licenses for this work are available. These replace the above + * ASL 2.0 and offer limited warranties, support, maintenance, and commercial + * database integrations. + * + * For more information, please visit: http://www.jooq.org/licenses + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ +package org.jooq; + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jOOQ/src/main/java/org/jooq/impl/DSL.java b/jOOQ/src/main/java/org/jooq/impl/DSL.java index b425334bfa..0362f97d0b 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DSL.java +++ b/jOOQ/src/main/java/org/jooq/impl/DSL.java @@ -9795,6 +9795,24 @@ public class DSL { + + + + + + + + + + + + + + + + + + diff --git a/jOOQ/src/main/java/org/jooq/impl/Exit.java b/jOOQ/src/main/java/org/jooq/impl/Exit.java new file mode 100644 index 0000000000..b822987d92 --- /dev/null +++ b/jOOQ/src/main/java/org/jooq/impl/Exit.java @@ -0,0 +1,73 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Other licenses: + * ----------------------------------------------------------------------------- + * Commercial licenses for this work are available. These replace the above + * ASL 2.0 and offer limited warranties, support, maintenance, and commercial + * database integrations. + * + * For more information, please visit: http://www.jooq.org/licenses + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ +package org.jooq.impl; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jOOQ/src/main/java/org/jooq/impl/Keywords.java b/jOOQ/src/main/java/org/jooq/impl/Keywords.java index 0e9782fe41..c059161ad5 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Keywords.java +++ b/jOOQ/src/main/java/org/jooq/impl/Keywords.java @@ -131,6 +131,7 @@ final class Keywords { static final Keyword K_EXECUTE_IMMEDIATE = keyword("execute immediate"); static final Keyword K_EXECUTE_STATEMENT = keyword("execute statement"); static final Keyword K_EXISTS = keyword("exists"); + static final Keyword K_EXIT = keyword("exit"); static final Keyword K_FALSE = keyword("false"); static final Keyword K_FETCH_FIRST = keyword("fetch first"); static final Keyword K_FETCH_NEXT = keyword("fetch next"); diff --git a/jOOQ/src/main/java/org/jooq/impl/LoopImpl.java b/jOOQ/src/main/java/org/jooq/impl/LoopImpl.java new file mode 100644 index 0000000000..a2a4224d6c --- /dev/null +++ b/jOOQ/src/main/java/org/jooq/impl/LoopImpl.java @@ -0,0 +1,85 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Other licenses: + * ----------------------------------------------------------------------------- + * Commercial licenses for this work are available. These replace the above + * ASL 2.0 and offer limited warranties, support, maintenance, and commercial + * database integrations. + * + * For more information, please visit: http://www.jooq.org/licenses + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ +package org.jooq.impl; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java b/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java index f6a5f89e86..9c60a4e4bc 100644 --- a/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java @@ -101,6 +101,8 @@ import static org.jooq.impl.DSL.denseRank; import static org.jooq.impl.DSL.epoch; import static org.jooq.impl.DSL.every; import static org.jooq.impl.DSL.exists; +// ... +// ... import static org.jooq.impl.DSL.exp; import static org.jooq.impl.DSL.extract; import static org.jooq.impl.DSL.field; @@ -260,7 +262,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; @@ -2249,6 +2251,16 @@ final class ParserImpl implements Parser { + ; + + break; + + case 'e': + case 'E': + if (peekKeyword(ctx, "EXIT") && ctx.requireProEdition()) + + + ; break; @@ -2389,6 +2401,15 @@ final class ParserImpl implements Parser { + + + + + + + + + diff --git a/jOOQ/src/main/java/org/jooq/impl/While.java b/jOOQ/src/main/java/org/jooq/impl/While.java new file mode 100644 index 0000000000..2d96733f63 --- /dev/null +++ b/jOOQ/src/main/java/org/jooq/impl/While.java @@ -0,0 +1,71 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Other licenses: + * ----------------------------------------------------------------------------- + * Commercial licenses for this work are available. These replace the above + * ASL 2.0 and offer limited warranties, support, maintenance, and commercial + * database integrations. + * + * For more information, please visit: http://www.jooq.org/licenses + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ +package org.jooq.impl; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file