diff --git a/jOOQ/src/main/java/org/jooq/AlterDatabaseFinalStep.java b/jOOQ/src/main/java/org/jooq/AlterDatabaseFinalStep.java
index c213356bb0..8a72d9b513 100644
--- a/jOOQ/src/main/java/org/jooq/AlterDatabaseFinalStep.java
+++ b/jOOQ/src/main/java/org/jooq/AlterDatabaseFinalStep.java
@@ -42,7 +42,7 @@ import static org.jooq.SQLDialect.*;
import java.util.*;
/**
- * A step in the construction of the ALTER DATABASE statement.
+ * A step in the construction of the ALTER DATABASE statement.
*
*
XYZ*Step types directly from client code
diff --git a/jOOQ/src/main/java/org/jooq/AlterDatabaseStep.java b/jOOQ/src/main/java/org/jooq/AlterDatabaseStep.java
index 635c1cd579..7f4dc95bf5 100644
--- a/jOOQ/src/main/java/org/jooq/AlterDatabaseStep.java
+++ b/jOOQ/src/main/java/org/jooq/AlterDatabaseStep.java
@@ -42,7 +42,7 @@ import static org.jooq.SQLDialect.*;
import java.util.*;
/**
- * A step in the construction of the ALTER DATABASE statement.
+ * A step in the construction of the ALTER DATABASE statement.
*
*
XYZ*Step types directly from client code
diff --git a/jOOQ/src/main/java/org/jooq/AlterDomainDropConstraintCascadeStep.java b/jOOQ/src/main/java/org/jooq/AlterDomainDropConstraintCascadeStep.java
index 670066dd90..2fe68fb40d 100644
--- a/jOOQ/src/main/java/org/jooq/AlterDomainDropConstraintCascadeStep.java
+++ b/jOOQ/src/main/java/org/jooq/AlterDomainDropConstraintCascadeStep.java
@@ -42,7 +42,7 @@ import static org.jooq.SQLDialect.*;
import java.util.*;
/**
- * A step in the construction of the ALTER DOMAIN statement.
+ * A step in the construction of the ALTER DOMAIN statement.
*
*
XYZ*Step types directly from client code
diff --git a/jOOQ/src/main/java/org/jooq/AlterDomainFinalStep.java b/jOOQ/src/main/java/org/jooq/AlterDomainFinalStep.java
index 6852d5d585..973a7d111a 100644
--- a/jOOQ/src/main/java/org/jooq/AlterDomainFinalStep.java
+++ b/jOOQ/src/main/java/org/jooq/AlterDomainFinalStep.java
@@ -42,7 +42,7 @@ import static org.jooq.SQLDialect.*;
import java.util.*;
/**
- * A step in the construction of the ALTER DOMAIN statement.
+ * A step in the construction of the ALTER DOMAIN statement.
*
*
XYZ*Step types directly from client code
diff --git a/jOOQ/src/main/java/org/jooq/AlterDomainRenameConstraintStep.java b/jOOQ/src/main/java/org/jooq/AlterDomainRenameConstraintStep.java
index 79ea1660e1..5f10473607 100644
--- a/jOOQ/src/main/java/org/jooq/AlterDomainRenameConstraintStep.java
+++ b/jOOQ/src/main/java/org/jooq/AlterDomainRenameConstraintStep.java
@@ -42,7 +42,7 @@ import static org.jooq.SQLDialect.*;
import java.util.*;
/**
- * A step in the construction of the ALTER DOMAIN statement.
+ * A step in the construction of the ALTER DOMAIN statement.
*
*
XYZ*Step types directly from client code
diff --git a/jOOQ/src/main/java/org/jooq/AlterDomainStep.java b/jOOQ/src/main/java/org/jooq/AlterDomainStep.java
index 19a0bc3b18..a6e8409d2a 100644
--- a/jOOQ/src/main/java/org/jooq/AlterDomainStep.java
+++ b/jOOQ/src/main/java/org/jooq/AlterDomainStep.java
@@ -42,7 +42,7 @@ import static org.jooq.SQLDialect.*;
import java.util.*;
/**
- * A step in the construction of the ALTER DOMAIN statement.
+ * A step in the construction of the ALTER DOMAIN statement.
*
*
XYZ*Step types directly from client code
diff --git a/jOOQ/src/main/java/org/jooq/AlterSchemaFinalStep.java b/jOOQ/src/main/java/org/jooq/AlterSchemaFinalStep.java
index b7a8225884..0bae9c1334 100644
--- a/jOOQ/src/main/java/org/jooq/AlterSchemaFinalStep.java
+++ b/jOOQ/src/main/java/org/jooq/AlterSchemaFinalStep.java
@@ -37,8 +37,12 @@
*/
package org.jooq;
+import static org.jooq.SQLDialect.*;
+
+import java.util.*;
+
/**
- * The final step in the DROP SCHEMA DSL.
+ * A step in the construction of the ALTER SCHEMA statement.
*
*
XYZ*Step types directly from client code@@ -57,9 +61,7 @@ package org.jooq; *
ALTER SCHEMA DSL used to specify
- * ALTER behaviour.
+ * A step in the construction of the ALTER SCHEMA statement.
* *
XYZ*Step types directly from client code@@ -65,30 +61,25 @@ import static org.jooq.SQLDialect.POSTGRES; *
RENAME TO clause to the ALTER SCHEMA
- * statement.
+ * Add the RENAME TO clause to the ALTER SCHEMA statement.
*/
@Support({ H2, HSQLDB, POSTGRES })
- AlterSchemaFinalStep renameTo(Schema newName);
+ AlterSchemaFinalStep renameTo(String renameTo);
/**
- * Add a RENAME TO clause to the ALTER SCHEMA
- * statement.
+ * Add the RENAME TO clause to the ALTER SCHEMA statement.
*/
@Support({ H2, HSQLDB, POSTGRES })
- AlterSchemaFinalStep renameTo(Name newName);
+ AlterSchemaFinalStep renameTo(Name renameTo);
/**
- * Add a RENAME TO clause to the ALTER SCHEMA
- * statement.
+ * Add the RENAME TO clause to the ALTER SCHEMA statement.
*/
@Support({ H2, HSQLDB, POSTGRES })
- AlterSchemaFinalStep renameTo(String newName);
-
+ AlterSchemaFinalStep renameTo(Schema renameTo);
}
diff --git a/jOOQ/src/main/java/org/jooq/CreateDatabaseFinalStep.java b/jOOQ/src/main/java/org/jooq/CreateDatabaseFinalStep.java
index be2166c7c7..585e55aa56 100644
--- a/jOOQ/src/main/java/org/jooq/CreateDatabaseFinalStep.java
+++ b/jOOQ/src/main/java/org/jooq/CreateDatabaseFinalStep.java
@@ -42,7 +42,7 @@ import static org.jooq.SQLDialect.*;
import java.util.*;
/**
- * A step in the construction of the CREATE DATABASE statement.
+ * A step in the construction of the CREATE DATABASE statement.
* *
XYZ*Step types directly from client code
diff --git a/jOOQ/src/main/java/org/jooq/CreateDomainAsStep.java b/jOOQ/src/main/java/org/jooq/CreateDomainAsStep.java
index 33f4cd3b26..b155d68f18 100644
--- a/jOOQ/src/main/java/org/jooq/CreateDomainAsStep.java
+++ b/jOOQ/src/main/java/org/jooq/CreateDomainAsStep.java
@@ -42,7 +42,7 @@ import static org.jooq.SQLDialect.*;
import java.util.*;
/**
- * A step in the construction of the CREATE DOMAIN statement.
+ * A step in the construction of the CREATE DOMAIN statement.
*
*
XYZ*Step types directly from client code
diff --git a/jOOQ/src/main/java/org/jooq/CreateDomainConstraintStep.java b/jOOQ/src/main/java/org/jooq/CreateDomainConstraintStep.java
index 601d841718..bbd46f5fd9 100644
--- a/jOOQ/src/main/java/org/jooq/CreateDomainConstraintStep.java
+++ b/jOOQ/src/main/java/org/jooq/CreateDomainConstraintStep.java
@@ -42,7 +42,7 @@ import static org.jooq.SQLDialect.*;
import java.util.*;
/**
- * A step in the construction of the CREATE DOMAIN statement.
+ * A step in the construction of the CREATE DOMAIN statement.
*
*
XYZ*Step types directly from client code
diff --git a/jOOQ/src/main/java/org/jooq/CreateDomainDefaultStep.java b/jOOQ/src/main/java/org/jooq/CreateDomainDefaultStep.java
index ce520a6006..4d4ce793d0 100644
--- a/jOOQ/src/main/java/org/jooq/CreateDomainDefaultStep.java
+++ b/jOOQ/src/main/java/org/jooq/CreateDomainDefaultStep.java
@@ -42,7 +42,7 @@ import static org.jooq.SQLDialect.*;
import java.util.*;
/**
- * A step in the construction of the CREATE DOMAIN statement.
+ * A step in the construction of the CREATE DOMAIN statement.
*
*
XYZ*Step types directly from client code
diff --git a/jOOQ/src/main/java/org/jooq/CreateDomainFinalStep.java b/jOOQ/src/main/java/org/jooq/CreateDomainFinalStep.java
index 16b72fea13..c6d6faec63 100644
--- a/jOOQ/src/main/java/org/jooq/CreateDomainFinalStep.java
+++ b/jOOQ/src/main/java/org/jooq/CreateDomainFinalStep.java
@@ -42,7 +42,7 @@ import static org.jooq.SQLDialect.*;
import java.util.*;
/**
- * A step in the construction of the CREATE DOMAIN statement.
+ * A step in the construction of the CREATE DOMAIN statement.
*
*
XYZ*Step types directly from client code
diff --git a/jOOQ/src/main/java/org/jooq/CreateSchemaFinalStep.java b/jOOQ/src/main/java/org/jooq/CreateSchemaFinalStep.java
index 7bf3c2dca0..bc054ff010 100644
--- a/jOOQ/src/main/java/org/jooq/CreateSchemaFinalStep.java
+++ b/jOOQ/src/main/java/org/jooq/CreateSchemaFinalStep.java
@@ -42,7 +42,7 @@ import static org.jooq.SQLDialect.*;
import java.util.*;
/**
- * A step in the construction of the CREATE SCHEMA statement.
+ * A step in the construction of the CREATE SCHEMA statement.
*
*
XYZ*Step types directly from client code
diff --git a/jOOQ/src/main/java/org/jooq/DSLContext.java b/jOOQ/src/main/java/org/jooq/DSLContext.java
index a8c5ac8529..2820ab02f8 100644
--- a/jOOQ/src/main/java/org/jooq/DSLContext.java
+++ b/jOOQ/src/main/java/org/jooq/DSLContext.java
@@ -8980,6 +8980,54 @@ public interface DSLContext extends Scope , AutoCloseable {
@Support({ POSTGRES })
*
diff --git a/jOOQ/src/main/java/org/jooq/DropDomainCascadeStep.java b/jOOQ/src/main/java/org/jooq/DropDomainCascadeStep.java
index e9b1a94663..ea2ea6e4c7 100644
--- a/jOOQ/src/main/java/org/jooq/DropDomainCascadeStep.java
+++ b/jOOQ/src/main/java/org/jooq/DropDomainCascadeStep.java
@@ -42,7 +42,7 @@ import static org.jooq.SQLDialect.*;
import java.util.*;
/**
- * A step in the construction of the DROP DOMAIN statement.
+ * A step in the construction of the
*
diff --git a/jOOQ/src/main/java/org/jooq/DropDomainFinalStep.java b/jOOQ/src/main/java/org/jooq/DropDomainFinalStep.java
index 52e98b95bf..62d01d45e1 100644
--- a/jOOQ/src/main/java/org/jooq/DropDomainFinalStep.java
+++ b/jOOQ/src/main/java/org/jooq/DropDomainFinalStep.java
@@ -42,7 +42,7 @@ import static org.jooq.SQLDialect.*;
import java.util.*;
/**
- * A step in the construction of the DROP DOMAIN statement.
+ * A step in the construction of the
*
diff --git a/jOOQ/src/main/java/org/jooq/DropSchemaFinalStep.java b/jOOQ/src/main/java/org/jooq/DropSchemaFinalStep.java
index 804dbdf958..861f828c4c 100644
--- a/jOOQ/src/main/java/org/jooq/DropSchemaFinalStep.java
+++ b/jOOQ/src/main/java/org/jooq/DropSchemaFinalStep.java
@@ -37,8 +37,12 @@
*/
package org.jooq;
+import static org.jooq.SQLDialect.*;
+
+import java.util.*;
+
/**
- * The final step in the
*
@@ -57,9 +61,7 @@ package org.jooq;
*
*
@@ -65,21 +61,18 @@ import static org.jooq.SQLDialect.POSTGRES;
* ALTER SCHEMA statement.
+ *
+ * @see DSL#alterSchema(String)
+ */
+ @Support({ H2, HSQLDB, POSTGRES })
+ AlterSchemaStep alterSchema(String schema);
+
+ /**
+ * The ALTER SCHEMA statement.
+ *
+ * @see DSL#alterSchema(Name)
+ */
+ @Support({ H2, HSQLDB, POSTGRES })
+ AlterSchemaStep alterSchema(Name schema);
+
+ /**
+ * The ALTER SCHEMA statement.
+ *
+ * @see DSL#alterSchema(Schema)
+ */
+ @Support({ H2, HSQLDB, POSTGRES })
+ AlterSchemaStep alterSchema(Schema schema);
+
+ /**
+ * The ALTER SCHEMA IF EXISTS statement.
+ *
+ * @see DSL#alterSchemaIfExists(String)
+ */
+ @Support({ H2 })
+ AlterSchemaStep alterSchemaIfExists(String schema);
+
+ /**
+ * The ALTER SCHEMA IF EXISTS statement.
+ *
+ * @see DSL#alterSchemaIfExists(Name)
+ */
+ @Support({ H2 })
+ AlterSchemaStep alterSchemaIfExists(Name schema);
+
+ /**
+ * The ALTER SCHEMA IF EXISTS statement.
+ *
+ * @see DSL#alterSchemaIfExists(Schema)
+ */
+ @Support({ H2 })
+ AlterSchemaStep alterSchemaIfExists(Schema schema);
+
/**
* The DROP DATABASE statement.
*
@@ -9076,6 +9124,54 @@ public interface DSLContext extends Scope , AutoCloseable {
@Support({ H2, POSTGRES })
DropDomainCascadeStep dropDomainIfExists(Domain> domain);
+ /**
+ * The DROP SCHEMA statement.
+ *
+ * @see DSL#dropSchema(String)
+ */
+ @Support({ DERBY, H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
+ DropSchemaStep dropSchema(String schema);
+
+ /**
+ * The DROP SCHEMA statement.
+ *
+ * @see DSL#dropSchema(Name)
+ */
+ @Support({ DERBY, H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
+ DropSchemaStep dropSchema(Name schema);
+
+ /**
+ * The DROP SCHEMA statement.
+ *
+ * @see DSL#dropSchema(Schema)
+ */
+ @Support({ DERBY, H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
+ DropSchemaStep dropSchema(Schema schema);
+
+ /**
+ * The DROP SCHEMA IF EXISTS statement.
+ *
+ * @see DSL#dropSchemaIfExists(String)
+ */
+ @Support({ H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
+ DropSchemaStep dropSchemaIfExists(String schema);
+
+ /**
+ * The DROP SCHEMA IF EXISTS statement.
+ *
+ * @see DSL#dropSchemaIfExists(Name)
+ */
+ @Support({ H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
+ DropSchemaStep dropSchemaIfExists(Name schema);
+
+ /**
+ * The DROP SCHEMA IF EXISTS statement.
+ *
+ * @see DSL#dropSchemaIfExists(Schema)
+ */
+ @Support({ H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
+ DropSchemaStep dropSchemaIfExists(Schema schema);
+
/**
@@ -10038,54 +10134,6 @@ public interface DSLContext extends Scope , AutoCloseable {
@Support({ H2, MARIADB, POSTGRES })
AlterTableStep alterTableIfExists(Table> table);
- /**
- * Create a new DSL ALTER SCHEMA statement.
- *
- * @see DSL#alterSchema(String)
- */
- @Support({ H2, HSQLDB, POSTGRES })
- AlterSchemaStep alterSchema(String schema);
-
- /**
- * Create a new DSL ALTER SCHEMA statement.
- *
- * @see DSL#alterSchema(Name)
- */
- @Support({ H2, HSQLDB, POSTGRES })
- AlterSchemaStep alterSchema(Name schema);
-
- /**
- * Create a new DSL ALTER SCHEMA statement.
- *
- * @see DSL#alterSchema(Schema)
- */
- @Support({ H2, HSQLDB, POSTGRES })
- AlterSchemaStep alterSchema(Schema schema);
-
- /**
- * Create a new DSL ALTER SCHEMA statement.
- *
- * @see DSL#alterSchemaIfExists(String)
- */
- @Support({ H2 })
- AlterSchemaStep alterSchemaIfExists(String schema);
-
- /**
- * Create a new DSL ALTER SCHEMA statement.
- *
- * @see DSL#alterSchemaIfExists(Name)
- */
- @Support({ H2 })
- AlterSchemaStep alterSchemaIfExists(Name schema);
-
- /**
- * Create a new DSL ALTER SCHEMA statement.
- *
- * @see DSL#alterSchemaIfExists(Schema)
- */
- @Support({ H2 })
- AlterSchemaStep alterSchemaIfExists(Schema schema);
-
/**
* Create a new DSL ALTER VIEW statement.
*
@@ -10182,54 +10230,6 @@ public interface DSLContext extends Scope , AutoCloseable {
@Support({ H2, POSTGRES })
AlterIndexStep alterIndexIfExists(Index index);
- /**
- * Create a new DSL DROP SCHEMA statement.
- *
- * @see DSL#dropSchema(String)
- */
- @Support({ DERBY, H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
- DropSchemaStep dropSchema(String schema);
-
- /**
- * Create a new DSL DROP SCHEMA statement.
- *
- * @see DSL#dropSchema(Name)
- */
- @Support({ DERBY, H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
- DropSchemaStep dropSchema(Name schema);
-
- /**
- * Create a new DSL DROP SCHEMA statement.
- *
- * @see DSL#dropSchema(Schema)
- */
- @Support({ DERBY, H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
- DropSchemaStep dropSchema(Schema schema);
-
- /**
- * Create a new DSL DROP SCHEMA statement.
- *
- * @see DSL#dropSchemaIfExists(String)
- */
- @Support({ H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
- DropSchemaStep dropSchemaIfExists(String schema);
-
- /**
- * Create a new DSL DROP SCHEMA statement.
- *
- * @see DSL#dropSchemaIfExists(Name)
- */
- @Support({ H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
- DropSchemaStep dropSchemaIfExists(Name schema);
-
- /**
- * Create a new DSL DROP SCHEMA statement.
- *
- * @see DSL#dropSchemaIfExists(Schema)
- */
- @Support({ H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
- DropSchemaStep dropSchemaIfExists(Schema schema);
-
/**
* Create a new DSL DROP VIEW statement.
*
diff --git a/jOOQ/src/main/java/org/jooq/DropDatabaseFinalStep.java b/jOOQ/src/main/java/org/jooq/DropDatabaseFinalStep.java
index 0fa135420f..ba8dbaf494 100644
--- a/jOOQ/src/main/java/org/jooq/DropDatabaseFinalStep.java
+++ b/jOOQ/src/main/java/org/jooq/DropDatabaseFinalStep.java
@@ -42,7 +42,7 @@ import static org.jooq.SQLDialect.*;
import java.util.*;
/**
- * A step in the construction of the DROP DATABASE statement.
+ * A step in the construction of the DROP DATABASE statement.
* Referencing
* XYZ*Step types directly from client codeDROP DOMAIN statement.
* Referencing
* XYZ*Step types directly from client codeDROP DOMAIN statement.
* Referencing
* XYZ*Step types directly from client codeDROP DATABASE DSL.
+ * A step in the construction of the DROP SCHEMA statement.
* Referencing
* XYZ*Step types directly from client codeDROP SCHEMA DSL used to specify
- * DROP behaviour.
+ * A step in the construction of the DROP SCHEMA statement.
* Referencing
* XYZ*Step types directly from client codeCASCADE clause to the DROP SCHEMA
- * statement.
+ * Add the CASCADE clause to the DROP SCHEMA statement.
*/
@Support({ H2, HSQLDB, POSTGRES })
DropSchemaFinalStep cascade();
/**
- * Add a RESTRICT clause to the DROP SCHEMA
- * statement.
+ * Add the RESTRICT clause to the DROP SCHEMA statement.
*/
@Support({ H2, HSQLDB, POSTGRES })
DropSchemaFinalStep restrict();
diff --git a/jOOQ/src/main/java/org/jooq/impl/AlterSchemaImpl.java b/jOOQ/src/main/java/org/jooq/impl/AlterSchemaImpl.java
index 0c521c31c9..491558a101 100644
--- a/jOOQ/src/main/java/org/jooq/impl/AlterSchemaImpl.java
+++ b/jOOQ/src/main/java/org/jooq/impl/AlterSchemaImpl.java
@@ -37,93 +37,96 @@
*/
package org.jooq.impl;
-import static org.jooq.Clause.ALTER_SCHEMA;
-import static org.jooq.Clause.ALTER_SCHEMA_RENAME;
-import static org.jooq.Clause.ALTER_SCHEMA_SCHEMA;
-// ...
-import static org.jooq.impl.DSL.name;
-import static org.jooq.impl.Keywords.K_ALTER_SCHEMA;
-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;
-import static org.jooq.impl.Keywords.K_SCHEMA;
-import static org.jooq.impl.Keywords.K_TO;
+import static org.jooq.impl.Keywords.*;
+import static org.jooq.impl.Tools.BooleanDataKey.*;
+import static org.jooq.SQLDialect.*;
-import java.util.Set;
+import org.jooq.*;
+import org.jooq.impl.*;
-import org.jooq.AlterSchemaFinalStep;
-import org.jooq.AlterSchemaStep;
-import org.jooq.Clause;
-import org.jooq.Configuration;
-import org.jooq.Context;
-import org.jooq.Name;
-// ...
-import org.jooq.SQLDialect;
-import org.jooq.Schema;
+import java.util.*;
/**
- * @author Lukas Eder
+ * The ALTER SCHEMA IF EXISTS statement.
*/
-final class AlterSchemaImpl extends AbstractRowCountQuery implements
-
- // Cascading interface implementations for ALTER SCHEMA behaviour
+@SuppressWarnings({ "hiding", "unused" })
+final class AlterSchemaImpl
+extends
+ AbstractRowCountQuery
+implements
AlterSchemaStep,
- AlterSchemaFinalStep {
+ AlterSchemaFinalStep
+{
+
+ private static final long serialVersionUID = 1L;
- /**
- * Generated UID
- */
- private static final long serialVersionUID = 8904572826501186329L;
- private static final Clause[] CLAUSES = { ALTER_SCHEMA };
-
-
-
-
-
-
-
- private final Schema schema;
- private final boolean ifExists;
- private Schema renameTo;
-
- AlterSchemaImpl(Configuration configuration, Schema schema) {
- this(configuration, schema, false);
+ private final Schema schema;
+ private final boolean ifExists;
+ private Schema renameTo;
+
+ AlterSchemaImpl(
+ Configuration configuration,
+ Schema schema,
+ boolean ifExists
+ ) {
+ this(
+ configuration,
+ schema,
+ ifExists,
+ null
+ );
}
-
- AlterSchemaImpl(Configuration configuration, Schema schema, boolean ifExists) {
+
+ AlterSchemaImpl(
+ Configuration configuration,
+ Schema schema,
+ boolean ifExists,
+ Schema renameTo
+ ) {
super(configuration);
this.schema = schema;
this.ifExists = ifExists;
+ this.renameTo = renameTo;
}
final Schema $schema() { return schema; }
final boolean $ifExists() { return ifExists; }
final Schema $renameTo() { return renameTo; }
- // ------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// XXX: DSL API
- // ------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
+
+ @Override
+ public final AlterSchemaImpl renameTo(String renameTo) {
+ return renameTo(DSL.schema(renameTo));
+ }
@Override
- public final AlterSchemaImpl renameTo(Schema newName) {
- this.renameTo = newName;
+ public final AlterSchemaImpl renameTo(Name renameTo) {
+ return renameTo(DSL.schema(renameTo));
+ }
+
+ @Override
+ public final AlterSchemaImpl renameTo(Schema renameTo) {
+ this.renameTo = renameTo;
return this;
}
- @Override
- public final AlterSchemaImpl renameTo(Name newName) {
- return renameTo(DSL.schema(newName));
- }
-
- @Override
- public final AlterSchemaImpl renameTo(String newName) {
- return renameTo(name(newName));
- }
-
- // ------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// XXX: QueryPart API
- // ------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
+
+
+
+ private static final Clause[] CLAUSES = { Clause.ALTER_SCHEMA };
+
+
+
+
+
+
@@ -146,7 +149,7 @@ final class AlterSchemaImpl extends AbstractRowCountQuery implements
}
private final void accept0(Context> ctx) {
- ctx.start(ALTER_SCHEMA_SCHEMA);
+ ctx.start(Clause.ALTER_SCHEMA_SCHEMA);
boolean supportRename = false;
@@ -162,18 +165,18 @@ final class AlterSchemaImpl extends AbstractRowCountQuery implements
ctx.sql(' ').visit(K_IF_EXISTS);
ctx.sql(' ').visit(schema)
- .end(ALTER_SCHEMA_SCHEMA)
+ .end(Clause.ALTER_SCHEMA_SCHEMA)
.formatIndentStart()
.formatSeparator();
if (renameTo != null) {
boolean qualify = ctx.qualify();
- ctx.start(ALTER_SCHEMA_RENAME)
+ ctx.start(Clause.ALTER_SCHEMA_RENAME)
.qualify(false)
.visit(supportRename ? K_TO : K_RENAME_TO).sql(' ').visit(renameTo)
.qualify(qualify)
- .end(ALTER_SCHEMA_RENAME);
+ .end(Clause.ALTER_SCHEMA_RENAME);
}
ctx.formatIndentEnd();
@@ -183,4 +186,6 @@ final class AlterSchemaImpl extends AbstractRowCountQuery implements
public final Clause[] clauses(Context> ctx) {
return CLAUSES;
}
+
+
}
diff --git a/jOOQ/src/main/java/org/jooq/impl/DSL.java b/jOOQ/src/main/java/org/jooq/impl/DSL.java
index f99e5227b6..d9de445296 100644
--- a/jOOQ/src/main/java/org/jooq/impl/DSL.java
+++ b/jOOQ/src/main/java/org/jooq/impl/DSL.java
@@ -137,7 +137,6 @@ import javax.sql.DataSource;
import org.jooq.AggregateFunction;
import org.jooq.AlterIndexOnStep;
import org.jooq.AlterIndexStep;
-import org.jooq.AlterSchemaStep;
import org.jooq.AlterSequenceStep;
import org.jooq.AlterTableStep;
import org.jooq.AlterTypeStep;
@@ -198,7 +197,6 @@ import org.jooq.DeleteUsingStep;
import org.jooq.DerivedColumnList;
import org.jooq.Domain;
import org.jooq.DropIndexOnStep;
-import org.jooq.DropSchemaStep;
import org.jooq.DropSequenceFinalStep;
import org.jooq.DropTableStep;
import org.jooq.DropTypeStep;
@@ -7121,6 +7119,66 @@ public class DSL {
return dsl().alterDomainIfExists(domain);
}
+ /**
+ * The ALTER SCHEMA statement.
+ *
+ * @see DSLContext#alterSchema(String)
+ */
+ @Support({ H2, HSQLDB, POSTGRES })
+ public static org.jooq.AlterSchemaStep alterSchema(String schema) {
+ return dsl().alterSchema(schema);
+ }
+
+ /**
+ * The ALTER SCHEMA statement.
+ *
+ * @see DSLContext#alterSchema(Name)
+ */
+ @Support({ H2, HSQLDB, POSTGRES })
+ public static org.jooq.AlterSchemaStep alterSchema(Name schema) {
+ return dsl().alterSchema(schema);
+ }
+
+ /**
+ * The ALTER SCHEMA statement.
+ *
+ * @see DSLContext#alterSchema(Schema)
+ */
+ @Support({ H2, HSQLDB, POSTGRES })
+ public static org.jooq.AlterSchemaStep alterSchema(Schema schema) {
+ return dsl().alterSchema(schema);
+ }
+
+ /**
+ * The ALTER SCHEMA IF EXISTS statement.
+ *
+ * @see DSLContext#alterSchemaIfExists(String)
+ */
+ @Support({ H2 })
+ public static org.jooq.AlterSchemaStep alterSchemaIfExists(String schema) {
+ return dsl().alterSchemaIfExists(schema);
+ }
+
+ /**
+ * The ALTER SCHEMA IF EXISTS statement.
+ *
+ * @see DSLContext#alterSchemaIfExists(Name)
+ */
+ @Support({ H2 })
+ public static org.jooq.AlterSchemaStep alterSchemaIfExists(Name schema) {
+ return dsl().alterSchemaIfExists(schema);
+ }
+
+ /**
+ * The ALTER SCHEMA IF EXISTS statement.
+ *
+ * @see DSLContext#alterSchemaIfExists(Schema)
+ */
+ @Support({ H2 })
+ public static org.jooq.AlterSchemaStep alterSchemaIfExists(Schema schema) {
+ return dsl().alterSchemaIfExists(schema);
+ }
+
/**
* The DROP DATABASE statement.
*
@@ -7241,6 +7299,66 @@ public class DSL {
return dsl().dropDomainIfExists(domain);
}
+ /**
+ * The DROP SCHEMA statement.
+ *
+ * @see DSLContext#dropSchema(String)
+ */
+ @Support({ DERBY, H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
+ public static org.jooq.DropSchemaStep dropSchema(String schema) {
+ return dsl().dropSchema(schema);
+ }
+
+ /**
+ * The DROP SCHEMA statement.
+ *
+ * @see DSLContext#dropSchema(Name)
+ */
+ @Support({ DERBY, H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
+ public static org.jooq.DropSchemaStep dropSchema(Name schema) {
+ return dsl().dropSchema(schema);
+ }
+
+ /**
+ * The DROP SCHEMA statement.
+ *
+ * @see DSLContext#dropSchema(Schema)
+ */
+ @Support({ DERBY, H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
+ public static org.jooq.DropSchemaStep dropSchema(Schema schema) {
+ return dsl().dropSchema(schema);
+ }
+
+ /**
+ * The DROP SCHEMA IF EXISTS statement.
+ *
+ * @see DSLContext#dropSchemaIfExists(String)
+ */
+ @Support({ H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
+ public static org.jooq.DropSchemaStep dropSchemaIfExists(String schema) {
+ return dsl().dropSchemaIfExists(schema);
+ }
+
+ /**
+ * The DROP SCHEMA IF EXISTS statement.
+ *
+ * @see DSLContext#dropSchemaIfExists(Name)
+ */
+ @Support({ H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
+ public static org.jooq.DropSchemaStep dropSchemaIfExists(Name schema) {
+ return dsl().dropSchemaIfExists(schema);
+ }
+
+ /**
+ * The DROP SCHEMA IF EXISTS statement.
+ *
+ * @see DSLContext#dropSchemaIfExists(Schema)
+ */
+ @Support({ H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
+ public static org.jooq.DropSchemaStep dropSchemaIfExists(Schema schema) {
+ return dsl().dropSchemaIfExists(schema);
+ }
+
/**
@@ -8129,66 +8247,6 @@ public class DSL {
return dsl().alterTableIfExists(table);
}
- /**
- * Create a new DSL ALTER SCHEMA statement.
- *
- * @see DSLContext#alterSchema(String)
- */
- @Support({ H2, HSQLDB, POSTGRES })
- public static AlterSchemaStep alterSchema(String schema) {
- return dsl().alterSchema(schema);
- }
-
- /**
- * Create a new DSL ALTER SCHEMA statement.
- *
- * @see DSLContext#alterSchema(Name)
- */
- @Support({ H2, HSQLDB, POSTGRES })
- public static AlterSchemaStep alterSchema(Name schema) {
- return dsl().alterSchema(schema);
- }
-
- /**
- * Create a new DSL ALTER SCHEMA statement.
- *
- * @see DSLContext#alterSchema(Schema)
- */
- @Support({ H2, HSQLDB, POSTGRES })
- public static AlterSchemaStep alterSchema(Schema schema) {
- return dsl().alterSchema(schema);
- }
-
- /**
- * Create a new DSL ALTER SCHEMA statement.
- *
- * @see DSLContext#alterSchemaIfExists(String)
- */
- @Support({ H2 })
- public static AlterSchemaStep alterSchemaIfExists(String schema) {
- return dsl().alterSchemaIfExists(schema);
- }
-
- /**
- * Create a new DSL ALTER SCHEMA statement.
- *
- * @see DSLContext#alterSchemaIfExists(Name)
- */
- @Support({ H2 })
- public static AlterSchemaStep alterSchemaIfExists(Name schema) {
- return dsl().alterSchemaIfExists(schema);
- }
-
- /**
- * Create a new DSL ALTER SCHEMA statement.
- *
- * @see DSLContext#alterSchemaIfExists(Schema)
- */
- @Support({ H2 })
- public static AlterSchemaStep alterSchemaIfExists(Schema schema) {
- return dsl().alterSchemaIfExists(schema);
- }
-
/**
* Create a new DSL ALTER VIEW statement.
*
@@ -8309,66 +8367,6 @@ public class DSL {
return dsl().alterIndexIfExists(index);
}
- /**
- * Create a new DSL DROP SCHEMA statement.
- *
- * @see DSLContext#dropSchema(String)
- */
- @Support({ DERBY, H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
- public static DropSchemaStep dropSchema(String schema) {
- return dsl().dropSchema(schema);
- }
-
- /**
- * Create a new DSL DROP SCHEMA statement.
- *
- * @see DSLContext#dropSchema(Name)
- */
- @Support({ DERBY, H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
- public static DropSchemaStep dropSchema(Name schema) {
- return dsl().dropSchema(schema);
- }
-
- /**
- * Create a new DSL DROP SCHEMA statement.
- *
- * @see DSLContext#dropSchema(Schema)
- */
- @Support({ DERBY, H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
- public static DropSchemaStep dropSchema(Schema schema) {
- return dsl().dropSchema(schema);
- }
-
- /**
- * Create a new DSL DROP SCHEMA statement.
- *
- * @see DSLContext#dropSchemaIfExists(String)
- */
- @Support({ H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
- public static DropSchemaStep dropSchemaIfExists(String schema) {
- return dsl().dropSchemaIfExists(schema);
- }
-
- /**
- * Create a new DSL DROP SCHEMA statement.
- *
- * @see DSLContext#dropSchemaIfExists(Name)
- */
- @Support({ H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
- public static DropSchemaStep dropSchemaIfExists(Name schema) {
- return dsl().dropSchemaIfExists(schema);
- }
-
- /**
- * Create a new DSL DROP SCHEMA statement.
- *
- * @see DSLContext#dropSchemaIfExists(Schema)
- */
- @Support({ H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
- public static DropSchemaStep dropSchemaIfExists(Schema schema) {
- return dsl().dropSchemaIfExists(schema);
- }
-
/**
* Create a new DSL DROP VIEW statement.
*
diff --git a/jOOQ/src/main/java/org/jooq/impl/DefaultDSLContext.java b/jOOQ/src/main/java/org/jooq/impl/DefaultDSLContext.java
index d4eb947fb2..9226c41772 100644
--- a/jOOQ/src/main/java/org/jooq/impl/DefaultDSLContext.java
+++ b/jOOQ/src/main/java/org/jooq/impl/DefaultDSLContext.java
@@ -94,7 +94,6 @@ import javax.xml.parsers.SAXParserFactory;
import org.jooq.AlterIndexOnStep;
import org.jooq.AlterIndexStep;
-import org.jooq.AlterSchemaStep;
import org.jooq.AlterSequenceStep;
import org.jooq.AlterTableStep;
import org.jooq.AlterTypeStep;
@@ -128,7 +127,6 @@ import org.jooq.DeleteQuery;
import org.jooq.DeleteUsingStep;
import org.jooq.Domain;
import org.jooq.DropIndexOnStep;
-import org.jooq.DropSchemaStep;
import org.jooq.DropSequenceFinalStep;
import org.jooq.DropTableStep;
import org.jooq.DropTypeStep;
@@ -3068,6 +3066,36 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
return new AlterDomainImpl<>(configuration(), domain, true);
}
+ @Override
+ public org.jooq.AlterSchemaStep alterSchema(String schema) {
+ return new AlterSchemaImpl(configuration(), DSL.schema(schema), false);
+ }
+
+ @Override
+ public org.jooq.AlterSchemaStep alterSchema(Name schema) {
+ return new AlterSchemaImpl(configuration(), DSL.schema(schema), false);
+ }
+
+ @Override
+ public org.jooq.AlterSchemaStep alterSchema(Schema schema) {
+ return new AlterSchemaImpl(configuration(), schema, false);
+ }
+
+ @Override
+ public org.jooq.AlterSchemaStep alterSchemaIfExists(String schema) {
+ return new AlterSchemaImpl(configuration(), DSL.schema(schema), true);
+ }
+
+ @Override
+ public org.jooq.AlterSchemaStep alterSchemaIfExists(Name schema) {
+ return new AlterSchemaImpl(configuration(), DSL.schema(schema), true);
+ }
+
+ @Override
+ public org.jooq.AlterSchemaStep alterSchemaIfExists(Schema schema) {
+ return new AlterSchemaImpl(configuration(), schema, true);
+ }
+
@Override
public org.jooq.DropDatabaseFinalStep dropDatabase(String database) {
return new DropDatabaseImpl(configuration(), DSL.catalog(database), false);
@@ -3128,6 +3156,36 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
return new DropDomainImpl(configuration(), domain, true);
}
+ @Override
+ public org.jooq.DropSchemaStep dropSchema(String schema) {
+ return new DropSchemaImpl(configuration(), DSL.schema(schema), false);
+ }
+
+ @Override
+ public org.jooq.DropSchemaStep dropSchema(Name schema) {
+ return new DropSchemaImpl(configuration(), DSL.schema(schema), false);
+ }
+
+ @Override
+ public org.jooq.DropSchemaStep dropSchema(Schema schema) {
+ return new DropSchemaImpl(configuration(), schema, false);
+ }
+
+ @Override
+ public org.jooq.DropSchemaStep dropSchemaIfExists(String schema) {
+ return new DropSchemaImpl(configuration(), DSL.schema(schema), true);
+ }
+
+ @Override
+ public org.jooq.DropSchemaStep dropSchemaIfExists(Name schema) {
+ return new DropSchemaImpl(configuration(), DSL.schema(schema), true);
+ }
+
+ @Override
+ public org.jooq.DropSchemaStep dropSchemaIfExists(Schema schema) {
+ return new DropSchemaImpl(configuration(), schema, true);
+ }
+
@Override
@@ -3730,36 +3788,6 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
return new AlterTableImpl(configuration(), table, true);
}
- @Override
- public AlterSchemaStep alterSchema(String schema) {
- return alterSchema(name(schema));
- }
-
- @Override
- public AlterSchemaStep alterSchema(Name schema) {
- return alterSchema(schema(schema));
- }
-
- @Override
- public AlterSchemaStep alterSchema(Schema schema) {
- return new AlterSchemaImpl(configuration(), schema);
- }
-
- @Override
- public AlterSchemaStep alterSchemaIfExists(String schema) {
- return alterSchemaIfExists(name(schema));
- }
-
- @Override
- public AlterSchemaStep alterSchemaIfExists(Name schema) {
- return alterSchemaIfExists(schema(schema));
- }
-
- @Override
- public AlterSchemaStep alterSchemaIfExists(Schema schema) {
- return new AlterSchemaImpl(configuration(), schema, true);
- }
-
@Override
public AlterViewStep alterView(String table) {
return alterView(name(table));
@@ -3820,36 +3848,6 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
return new AlterIndexImpl(configuration(), index, true);
}
- @Override
- public DropSchemaStep dropSchema(String schema) {
- return dropSchema(name(schema));
- }
-
- @Override
- public DropSchemaStep dropSchema(Name schema) {
- return dropSchema(schema(schema));
- }
-
- @Override
- public DropSchemaStep dropSchema(Schema schema) {
- return new DropSchemaImpl(configuration(), schema);
- }
-
- @Override
- public DropSchemaStep dropSchemaIfExists(String schema) {
- return dropSchemaIfExists(name(schema));
- }
-
- @Override
- public DropSchemaStep dropSchemaIfExists(Name schema) {
- return dropSchemaIfExists(schema(schema));
- }
-
- @Override
- public DropSchemaStep dropSchemaIfExists(Schema schema) {
- return new DropSchemaImpl(configuration(), schema, true);
- }
-
@Override
public DropViewFinalStep dropView(String view) {
return dropView(name(view));
diff --git a/jOOQ/src/main/java/org/jooq/impl/DropSchemaImpl.java b/jOOQ/src/main/java/org/jooq/impl/DropSchemaImpl.java
index a33e3768bc..c74b749244 100644
--- a/jOOQ/src/main/java/org/jooq/impl/DropSchemaImpl.java
+++ b/jOOQ/src/main/java/org/jooq/impl/DropSchemaImpl.java
@@ -37,50 +37,86 @@
*/
package org.jooq.impl;
-import static org.jooq.Clause.DROP_SCHEMA;
-import static org.jooq.Clause.DROP_SCHEMA_SCHEMA;
-// ...
-// ...
-// ...
-import static org.jooq.SQLDialect.DERBY;
-import static org.jooq.SQLDialect.FIREBIRD;
-// ...
-// ...
-// ...
-// ...
-// ...
-import static org.jooq.impl.Keywords.K_CASCADE;
-import static org.jooq.impl.Keywords.K_DATABASE;
-import static org.jooq.impl.Keywords.K_DROP;
-import static org.jooq.impl.Keywords.K_IF_EXISTS;
-import static org.jooq.impl.Keywords.K_RESTRICT;
-import static org.jooq.impl.Keywords.K_SCHEMA;
+import static org.jooq.impl.Keywords.*;
+import static org.jooq.impl.Tools.BooleanDataKey.*;
+import static org.jooq.SQLDialect.*;
-import java.util.Set;
-
-import org.jooq.Clause;
-import org.jooq.Configuration;
-import org.jooq.Context;
-import org.jooq.DropSchemaFinalStep;
-import org.jooq.DropSchemaStep;
-// ...
-import org.jooq.SQLDialect;
-import org.jooq.Schema;
+import org.jooq.*;
+import org.jooq.impl.*;
+import java.util.*;
/**
- * @author Lukas Eder
+ * The DROP SCHEMA IF EXISTS statement.
*/
-final class DropSchemaImpl extends AbstractRowCountQuery implements
+@SuppressWarnings({ "unused" })
+final class DropSchemaImpl
+extends
+ AbstractRowCountQuery
+implements
+ DropSchemaStep,
+ DropSchemaFinalStep
+{
+
+ private static final long serialVersionUID = 1L;
- // Cascading interface implementations for DROP SCHEMA behaviour
- DropSchemaStep {
+ private final Schema schema;
+ private final boolean ifExists;
+ private Boolean cascade;
+
+ DropSchemaImpl(
+ Configuration configuration,
+ Schema schema,
+ boolean ifExists
+ ) {
+ this(
+ configuration,
+ schema,
+ ifExists,
+ null
+ );
+ }
+
+ DropSchemaImpl(
+ Configuration configuration,
+ Schema schema,
+ boolean ifExists,
+ Boolean cascade
+ ) {
+ super(configuration);
- /**
- * Generated UID
- */
- private static final long serialVersionUID = 8904572826501186329L;
- private static final Clause[] CLAUSES = { DROP_SCHEMA };
+ this.schema = schema;
+ this.ifExists = ifExists;
+ this.cascade = cascade;
+ }
+
+ final Schema $schema() { return schema; }
+ final boolean $ifExists() { return ifExists; }
+ final Boolean $cascade() { return cascade; }
+
+ // -------------------------------------------------------------------------
+ // XXX: DSL API
+ // -------------------------------------------------------------------------
+
+ @Override
+ public final DropSchemaImpl cascade() {
+ this.cascade = true;
+ return this;
+ }
+
+ @Override
+ public final DropSchemaImpl restrict() {
+ this.cascade = false;
+ return this;
+ }
+
+ // -------------------------------------------------------------------------
+ // XXX: QueryPart API
+ // -------------------------------------------------------------------------
+
+
+
+ private static final Clause[] CLAUSES = { Clause.DROP_SCHEMA };
private static final Set