[#6275] Add SQL Server support for ALTER VIEW .. RENAME

This commit is contained in:
lukaseder 2017-05-25 13:23:17 +02:00
parent 47a8048573
commit 7c77e96307
3 changed files with 22 additions and 5 deletions

View File

@ -37,6 +37,7 @@ package org.jooq;
import static org.jooq.SQLDialect.HSQLDB;
// ...
import static org.jooq.SQLDialect.POSTGRES;
// ...
/**
* The step in the <code>ALTER VIEW</code> where the action can be decided.

View File

@ -49,6 +49,7 @@ import static org.jooq.SQLDialect.HSQLDB;
// ...
import static org.jooq.impl.DSL.name;
import static org.jooq.impl.Keywords.K_ALTER;
import static org.jooq.impl.Keywords.K_EXEC;
import static org.jooq.impl.Keywords.K_IF_EXISTS;
import static org.jooq.impl.Keywords.K_RENAME;
import static org.jooq.impl.Keywords.K_RENAME_TO;
@ -135,7 +136,6 @@ final class AlterViewImpl extends AbstractQuery implements
}
private final void accept0(Context<?> ctx) {
switch (ctx.family()) {
@ -146,11 +146,10 @@ final class AlterViewImpl extends AbstractQuery implements
default:
accept1(ctx);
break;
}
accept1(ctx);
}
@ -167,6 +166,21 @@ final class AlterViewImpl extends AbstractQuery implements

View File

@ -51,6 +51,7 @@ import static org.jooq.conf.ParamType.NAMED_OR_INLINED;
import static org.jooq.conf.SettingsTools.getBackslashEscaping;
import static org.jooq.conf.SettingsTools.reflectionCaching;
import static org.jooq.conf.SettingsTools.updatablePrimaryKeys;
import static org.jooq.impl.DDLStatementType.ALTER_VIEW;
import static org.jooq.impl.DDLStatementType.CREATE_INDEX;
import static org.jooq.impl.DDLStatementType.CREATE_SCHEMA;
import static org.jooq.impl.DDLStatementType.CREATE_SEQUENCE;
@ -3397,6 +3398,7 @@ final class Tools {
case FIREBIRD: {