[jOOQ/jOOQ#1985] Add support for EXASOL

- Support procedural language (in CREATE FUNCTION)
This commit is contained in:
Lukas Eder 2021-05-13 15:23:06 +02:00
parent 09919669c2
commit e28b5de8ed
14 changed files with 45 additions and 6 deletions

View File

@ -131,5 +131,6 @@ import org.jetbrains.annotations.*;

View File

@ -78,5 +78,6 @@ package org.jooq;

View File

@ -116,5 +116,6 @@ package org.jooq;

View File

@ -86,5 +86,6 @@ package org.jooq;

View File

@ -79,5 +79,6 @@ package org.jooq;

View File

@ -79,5 +79,6 @@ package org.jooq;

View File

@ -70,5 +70,6 @@ package org.jooq;

View File

@ -118,5 +118,6 @@ package org.jooq;

View File

@ -139,5 +139,6 @@ package org.jooq.impl;

View File

@ -40,6 +40,7 @@ package org.jooq.impl;
// ...
// ...
// ...
// ...
import static org.jooq.SQLDialect.FIREBIRD;
import static org.jooq.SQLDialect.H2;
// ...
@ -64,8 +65,11 @@ import static org.jooq.impl.Keywords.K_END;
import static org.jooq.impl.Keywords.K_EXECUTE_BLOCK;
import static org.jooq.impl.Keywords.K_EXECUTE_IMMEDIATE;
import static org.jooq.impl.Keywords.K_EXECUTE_STATEMENT;
import static org.jooq.impl.Keywords.K_IF;
import static org.jooq.impl.Keywords.K_NOT;
import static org.jooq.impl.Keywords.K_PROCEDURE;
import static org.jooq.impl.Keywords.K_THEN;
import static org.jooq.impl.Keywords.K_TRUE;
import static org.jooq.impl.Tools.decrement;
import static org.jooq.impl.Tools.increment;
import static org.jooq.impl.Tools.toplevel;
@ -94,8 +98,6 @@ import org.jooq.conf.ParamType;
import org.jooq.impl.ScopeMarker.ScopeContent;
import org.jooq.impl.Tools.DataExtendedKey;
import org.jetbrains.annotations.Nullable;
/**
* @author Lukas Eder
*/
@ -222,6 +224,7 @@ final class BlockImpl extends AbstractRowCountQuery implements Block {
case HSQLDB:
case MARIADB:
default: {
@ -364,9 +367,9 @@ final class BlockImpl extends AbstractRowCountQuery implements Block {
{
begin(ctx);
begin(ctx, topLevel);
scopeDeclarations(ctx, c -> accept1(c));
end(ctx);
end(ctx, topLevel);
}
}
else
@ -500,9 +503,14 @@ final class BlockImpl extends AbstractRowCountQuery implements Block {
private static final void begin(Context<?> ctx) {
private static final void begin(Context<?> ctx, boolean topLevel) {
if (ctx.family() == H2)
ctx.sql('{');
else
ctx.visit(K_BEGIN);
@ -514,12 +522,17 @@ final class BlockImpl extends AbstractRowCountQuery implements Block {
ctx.formatIndentStart();
}
private static final void end(Context<?> ctx) {
private static final void end(Context<?> ctx, boolean topLevel) {
ctx.formatIndentEnd()
.formatSeparator();
if (ctx.family() == H2)
ctx.sql('}');
else
ctx.visit(K_END);

View File

@ -293,6 +293,18 @@ package org.jooq.impl;

View File

@ -284,6 +284,9 @@ package org.jooq.impl;

View File

@ -191,5 +191,6 @@ package org.jooq.impl;

View File

@ -120,5 +120,6 @@ package org.jooq.impl;