diff --git a/jOOQ/src/main/java/org/jooq/CreateTypeFinalStep.java b/jOOQ/src/main/java/org/jooq/CreateTypeFinalStep.java
index 958db20a36..743d1378bc 100644
--- a/jOOQ/src/main/java/org/jooq/CreateTypeFinalStep.java
+++ b/jOOQ/src/main/java/org/jooq/CreateTypeFinalStep.java
@@ -37,9 +37,19 @@
*/
package org.jooq;
+import static org.jooq.SQLDialect.*;
+import static org.jooq.impl.DSL.*;
+
+import java.util.*;
+
+import org.jooq.impl.DSL;
+
+import org.jetbrains.annotations.*;
/**
- * A {@link Query} that can create types.
+ * A step in the construction of the CREATE TYPE statement.
+ *
+ * @deprecated - [#11329] - 3.15.0 - This type will be removed in the future. Do not reference it directly *
*
XYZ*Step types directly from client code@@ -58,11 +68,8 @@ package org.jooq; *
CREATE TYPE statement.
* *
XYZ*Step types directly from client code@@ -66,37 +66,35 @@ import java.util.Collection; *
AS ENUM clause to the CREATE TYPE statement.
*/
- @NotNull @CheckReturnValue
@Support({ H2, POSTGRES, YUGABYTEDB })
- CreateTypeFinalStep asEnum();
-
- /**
- * Add the AS ENUM clause to the CREATE TYPE statement.
- */
@NotNull @CheckReturnValue
- @Support({ H2, POSTGRES, YUGABYTEDB })
CreateTypeFinalStep asEnum(String... values);
/**
* Add the AS ENUM clause to the CREATE TYPE statement.
*/
- @SuppressWarnings("unchecked")
- @NotNull @CheckReturnValue
@Support({ H2, POSTGRES, YUGABYTEDB })
+ @NotNull @CheckReturnValue
CreateTypeFinalStep asEnum(FieldAS ENUM clause to the CREATE TYPE statement.
*/
- @NotNull @CheckReturnValue
@Support({ H2, POSTGRES, YUGABYTEDB })
- CreateTypeFinalStep asEnum(Collection> values);
+ @NotNull @CheckReturnValue
+ CreateTypeFinalStep asEnum(Collection extends FieldAS ENUM clause to the CREATE TYPE statement.
+ */
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ @NotNull @CheckReturnValue
+ CreateTypeFinalStep asEnum();
}
diff --git a/jOOQ/src/main/java/org/jooq/DSLContext.java b/jOOQ/src/main/java/org/jooq/DSLContext.java
index 70ec69ee04..319cc2b6db 100644
--- a/jOOQ/src/main/java/org/jooq/DSLContext.java
+++ b/jOOQ/src/main/java/org/jooq/DSLContext.java
@@ -10273,6 +10273,33 @@ public interface DSLContext extends Scope {
+
+ /**
+ * The CREATE TYPE statement.
+ *
+ * @see DSL#createType(String)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ CreateTypeStep createType(@Stringly.Name String type);
+
+ /**
+ * The CREATE TYPE statement.
+ *
+ * @see DSL#createType(Name)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ CreateTypeStep createType(Name type);
+
+ /**
+ * The CREATE TYPE statement.
+ *
+ * @see DSL#createType(Type)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ CreateTypeStep createType(Type> type);
/**
* The CREATE SCHEMA statement.
@@ -10891,6 +10918,132 @@ public interface DSLContext extends Scope {
+
+ /**
+ * The DROP TYPE statement.
+ *
+ * @see DSL#dropType(String)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ DropTypeStep dropType(@Stringly.Name String types);
+
+ /**
+ * The DROP TYPE statement.
+ *
+ * @see DSL#dropType(Name)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ DropTypeStep dropType(Name types);
+
+ /**
+ * The DROP TYPE statement.
+ *
+ * @see DSL#dropType(Type)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ DropTypeStep dropType(Type> types);
+
+ /**
+ * The DROP TYPE statement.
+ *
+ * @see DSL#dropType(String...)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ DropTypeStep dropType(String... types);
+
+ /**
+ * The DROP TYPE statement.
+ *
+ * @see DSL#dropType(Name...)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ DropTypeStep dropType(Name... types);
+
+ /**
+ * The DROP TYPE statement.
+ *
+ * @see DSL#dropType(Type...)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ DropTypeStep dropType(Type>... types);
+
+ /**
+ * The DROP TYPE statement.
+ *
+ * @see DSL#dropType(Collection)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ DropTypeStep dropType(Collection extends Type>> types);
+
+ /**
+ * The DROP TYPE IF EXISTS statement.
+ *
+ * @see DSL#dropTypeIfExists(String)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ DropTypeStep dropTypeIfExists(@Stringly.Name String types);
+
+ /**
+ * The DROP TYPE IF EXISTS statement.
+ *
+ * @see DSL#dropTypeIfExists(Name)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ DropTypeStep dropTypeIfExists(Name types);
+
+ /**
+ * The DROP TYPE IF EXISTS statement.
+ *
+ * @see DSL#dropTypeIfExists(Type)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ DropTypeStep dropTypeIfExists(Type> types);
+
+ /**
+ * The DROP TYPE IF EXISTS statement.
+ *
+ * @see DSL#dropTypeIfExists(String...)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ DropTypeStep dropTypeIfExists(String... types);
+
+ /**
+ * The DROP TYPE IF EXISTS statement.
+ *
+ * @see DSL#dropTypeIfExists(Name...)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ DropTypeStep dropTypeIfExists(Name... types);
+
+ /**
+ * The DROP TYPE IF EXISTS statement.
+ *
+ * @see DSL#dropTypeIfExists(Type...)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ DropTypeStep dropTypeIfExists(Type>... types);
+
+ /**
+ * The DROP TYPE IF EXISTS statement.
+ *
+ * @see DSL#dropTypeIfExists(Collection)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ DropTypeStep dropTypeIfExists(Collection extends Type>> types);
/**
* The DROP VIEW statement.
@@ -11725,114 +11878,6 @@ public interface DSLContext extends Scope {
@Support({ DUCKDB, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE, YUGABYTEDB })
CreateViewAsStepCREATE TYPE statement.
- *
- * @see DSL#createType(String)
- */
- @NotNull @CheckReturnValue
- @Support({ H2, POSTGRES, YUGABYTEDB })
- CreateTypeStep createType(String type);
-
- /**
- * Create a new DSL CREATE TYPE statement.
- *
- * @see DSL#createType(Name)
- */
- @NotNull @CheckReturnValue
- @Support({ H2, POSTGRES, YUGABYTEDB })
- CreateTypeStep createType(Name type);
-
- /**
- * Create a new DSL DROP TYPE statement.
- *
- * @see DSL#dropType(String)
- */
- @NotNull @CheckReturnValue
- @Support({ H2, POSTGRES, YUGABYTEDB })
- DropTypeStep dropType(String type);
-
- /**
- * Create a new DSL DROP TYPE statement.
- *
- * @see DSL#dropType(Name)
- */
- @NotNull @CheckReturnValue
- @Support({ H2, POSTGRES, YUGABYTEDB })
- DropTypeStep dropType(Name type);
-
- /**
- * Create a new DSL DROP TYPE statement.
- *
- * @see DSL#dropType(String...)
- */
- @NotNull @CheckReturnValue
- @Support({ H2, POSTGRES, YUGABYTEDB })
- DropTypeStep dropType(String... type);
-
- /**
- * Create a new DSL DROP TYPE statement.
- *
- * @see DSL#dropType(Name...)
- */
- @NotNull @CheckReturnValue
- @Support({ H2, POSTGRES, YUGABYTEDB })
- DropTypeStep dropType(Name... type);
-
- /**
- * Create a new DSL DROP TYPE statement.
- *
- * @see DSL#dropType(Collection)
- */
- @NotNull @CheckReturnValue
- @Support({ H2, POSTGRES, YUGABYTEDB })
- DropTypeStep dropType(Collection> type);
-
- /**
- * Create a new DSL DROP TYPE statement.
- *
- * @see DSL#dropTypeIfExists(String)
- */
- @NotNull @CheckReturnValue
- @Support({ H2, POSTGRES, YUGABYTEDB })
- DropTypeStep dropTypeIfExists(String type);
-
- /**
- * Create a new DSL DROP TYPE statement.
- *
- * @see DSL#dropTypeIfExists(Name)
- */
- @NotNull @CheckReturnValue
- @Support({ H2, POSTGRES, YUGABYTEDB })
- DropTypeStep dropTypeIfExists(Name type);
-
- /**
- * Create a new DSL DROP TYPE statement.
- *
- * @see DSL#dropTypeIfExists(String...)
- */
- @NotNull @CheckReturnValue
- @Support({ H2, POSTGRES, YUGABYTEDB })
- DropTypeStep dropTypeIfExists(String... type);
-
- /**
- * Create a new DSL DROP TYPE statement.
- *
- * @see DSL#dropTypeIfExists(Name...)
- */
- @NotNull @CheckReturnValue
- @Support({ H2, POSTGRES, YUGABYTEDB })
- DropTypeStep dropTypeIfExists(Name... type);
-
- /**
- * Create a new DSL DROP TYPE statement.
- *
- * @see DSL#dropTypeIfExists(Collection)
- */
- @NotNull @CheckReturnValue
- @Support({ H2, POSTGRES, YUGABYTEDB })
- DropTypeStep dropTypeIfExists(Collection> type);
-
/**
* Create a new DSL ALTER TABLE statement.
*
diff --git a/jOOQ/src/main/java/org/jooq/DropTypeFinalStep.java b/jOOQ/src/main/java/org/jooq/DropTypeFinalStep.java
index e40db8617a..1921327935 100644
--- a/jOOQ/src/main/java/org/jooq/DropTypeFinalStep.java
+++ b/jOOQ/src/main/java/org/jooq/DropTypeFinalStep.java
@@ -37,9 +37,19 @@
*/
package org.jooq;
+import static org.jooq.SQLDialect.*;
+import static org.jooq.impl.DSL.*;
+
+import java.util.*;
+
+import org.jooq.impl.DSL;
+
+import org.jetbrains.annotations.*;
/**
- * A {@link Query} that can drop types.
+ * A step in the construction of the DROP TYPE statement.
+ * + * @deprecated - [#11329] - 3.15.0 - This type will be removed in the future. Do not reference it directly *
*
XYZ*Step types directly from client code@@ -58,11 +68,8 @@ package org.jooq; *
DROP TYPE statement.
* *
XYZ*Step types directly from client code@@ -64,22 +66,21 @@ import static org.jooq.SQLDialect.YUGABYTEDB; *
CASCADE clause to the DROP TYPE statement.
*/
- @NotNull @CheckReturnValue
@Support({ H2, POSTGRES, YUGABYTEDB })
+ @NotNull @CheckReturnValue
DropTypeFinalStep cascade();
/**
* Add the RESTRICT clause to the DROP TYPE statement.
*/
- @NotNull @CheckReturnValue
@Support({ H2, POSTGRES, YUGABYTEDB })
+ @NotNull @CheckReturnValue
DropTypeFinalStep restrict();
}
diff --git a/jOOQ/src/main/java/org/jooq/Type.java b/jOOQ/src/main/java/org/jooq/Type.java
new file mode 100644
index 0000000000..70ee3f42ba
--- /dev/null
+++ b/jOOQ/src/main/java/org/jooq/Type.java
@@ -0,0 +1,47 @@
+/*
+ * 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
+ *
+ * https://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: https://www.jooq.org/legal/licensing
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+package org.jooq;
+
+/**
+ * An object representing a user defined type.
+ *
+ * @author Lukas Eder
+ */
+public interface TypeCREATE TYPE statement.
*/
-final class CreateTypeImpl extends AbstractDDLQuery implements
-
- // Cascading interface implementations for CREATE TYPE behaviour
+@SuppressWarnings({ "hiding", "rawtypes", "unused" })
+final class CreateTypeImpl
+extends
+ AbstractDDLQuery
+implements
+ QOM.CreateType,
CreateTypeStep,
- CreateTypeFinalStep,
- CreateType
-
+ CreateTypeFinalStep
{
- private final Name type;
- private final QueryPartListCREATE TYPE statement.
+ *
+ * Unlike statement construction methods in the {@link DSLContext} API, this
+ * creates an unattached, and thus not directly renderable or executable
+ * statement. It can be used as a subquery or nested in procedural logic.
+ *
+ * @see DSLContext#createType(String)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ public static org.jooq.CreateTypeStep createType(@Stringly.Name String type) {
+ return dsl().createType(type);
+ }
+
+ /**
+ * The CREATE TYPE statement.
+ *
+ * Unlike statement construction methods in the {@link DSLContext} API, this
+ * creates an unattached, and thus not directly renderable or executable
+ * statement. It can be used as a subquery or nested in procedural logic.
+ *
+ * @see DSLContext#createType(Name)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ public static org.jooq.CreateTypeStep createType(Name type) {
+ return dsl().createType(type);
+ }
+
+ /**
+ * The CREATE TYPE statement.
+ *
+ * Unlike statement construction methods in the {@link DSLContext} API, this
+ * creates an unattached, and thus not directly renderable or executable
+ * statement. It can be used as a subquery or nested in procedural logic.
+ *
+ * @see DSLContext#createType(Type)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ public static org.jooq.CreateTypeStep createType(Type> type) {
+ return dsl().createType(type);
+ }
/**
* The CREATE SCHEMA statement.
@@ -9781,6 +9827,216 @@ public class DSL {
+
+ /**
+ * The DROP TYPE statement.
+ *
+ * Unlike statement construction methods in the {@link DSLContext} API, this
+ * creates an unattached, and thus not directly renderable or executable
+ * statement. It can be used as a subquery or nested in procedural logic.
+ *
+ * @see DSLContext#dropType(String)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ public static org.jooq.DropTypeStep dropType(@Stringly.Name String types) {
+ return dsl().dropType(types);
+ }
+
+ /**
+ * The DROP TYPE statement.
+ *
+ * Unlike statement construction methods in the {@link DSLContext} API, this
+ * creates an unattached, and thus not directly renderable or executable
+ * statement. It can be used as a subquery or nested in procedural logic.
+ *
+ * @see DSLContext#dropType(Name)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ public static org.jooq.DropTypeStep dropType(Name types) {
+ return dsl().dropType(types);
+ }
+
+ /**
+ * The DROP TYPE statement.
+ *
+ * Unlike statement construction methods in the {@link DSLContext} API, this
+ * creates an unattached, and thus not directly renderable or executable
+ * statement. It can be used as a subquery or nested in procedural logic.
+ *
+ * @see DSLContext#dropType(Type)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ public static org.jooq.DropTypeStep dropType(Type> types) {
+ return dsl().dropType(types);
+ }
+
+ /**
+ * The DROP TYPE statement.
+ *
+ * Unlike statement construction methods in the {@link DSLContext} API, this
+ * creates an unattached, and thus not directly renderable or executable
+ * statement. It can be used as a subquery or nested in procedural logic.
+ *
+ * @see DSLContext#dropType(String...)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ public static org.jooq.DropTypeStep dropType(String... types) {
+ return dsl().dropType(types);
+ }
+
+ /**
+ * The DROP TYPE statement.
+ *
+ * Unlike statement construction methods in the {@link DSLContext} API, this
+ * creates an unattached, and thus not directly renderable or executable
+ * statement. It can be used as a subquery or nested in procedural logic.
+ *
+ * @see DSLContext#dropType(Name...)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ public static org.jooq.DropTypeStep dropType(Name... types) {
+ return dsl().dropType(types);
+ }
+
+ /**
+ * The DROP TYPE statement.
+ *
+ * Unlike statement construction methods in the {@link DSLContext} API, this
+ * creates an unattached, and thus not directly renderable or executable
+ * statement. It can be used as a subquery or nested in procedural logic.
+ *
+ * @see DSLContext#dropType(Type...)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ public static org.jooq.DropTypeStep dropType(Type>... types) {
+ return dsl().dropType(types);
+ }
+
+ /**
+ * The DROP TYPE statement.
+ *
+ * Unlike statement construction methods in the {@link DSLContext} API, this
+ * creates an unattached, and thus not directly renderable or executable
+ * statement. It can be used as a subquery or nested in procedural logic.
+ *
+ * @see DSLContext#dropType(Collection)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ public static org.jooq.DropTypeStep dropType(Collection extends Type>> types) {
+ return dsl().dropType(types);
+ }
+
+ /**
+ * The DROP TYPE IF EXISTS statement.
+ *
+ * Unlike statement construction methods in the {@link DSLContext} API, this
+ * creates an unattached, and thus not directly renderable or executable
+ * statement. It can be used as a subquery or nested in procedural logic.
+ *
+ * @see DSLContext#dropTypeIfExists(String)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ public static org.jooq.DropTypeStep dropTypeIfExists(@Stringly.Name String types) {
+ return dsl().dropTypeIfExists(types);
+ }
+
+ /**
+ * The DROP TYPE IF EXISTS statement.
+ *
+ * Unlike statement construction methods in the {@link DSLContext} API, this
+ * creates an unattached, and thus not directly renderable or executable
+ * statement. It can be used as a subquery or nested in procedural logic.
+ *
+ * @see DSLContext#dropTypeIfExists(Name)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ public static org.jooq.DropTypeStep dropTypeIfExists(Name types) {
+ return dsl().dropTypeIfExists(types);
+ }
+
+ /**
+ * The DROP TYPE IF EXISTS statement.
+ *
+ * Unlike statement construction methods in the {@link DSLContext} API, this
+ * creates an unattached, and thus not directly renderable or executable
+ * statement. It can be used as a subquery or nested in procedural logic.
+ *
+ * @see DSLContext#dropTypeIfExists(Type)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ public static org.jooq.DropTypeStep dropTypeIfExists(Type> types) {
+ return dsl().dropTypeIfExists(types);
+ }
+
+ /**
+ * The DROP TYPE IF EXISTS statement.
+ *
+ * Unlike statement construction methods in the {@link DSLContext} API, this
+ * creates an unattached, and thus not directly renderable or executable
+ * statement. It can be used as a subquery or nested in procedural logic.
+ *
+ * @see DSLContext#dropTypeIfExists(String...)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ public static org.jooq.DropTypeStep dropTypeIfExists(String... types) {
+ return dsl().dropTypeIfExists(types);
+ }
+
+ /**
+ * The DROP TYPE IF EXISTS statement.
+ *
+ * Unlike statement construction methods in the {@link DSLContext} API, this
+ * creates an unattached, and thus not directly renderable or executable
+ * statement. It can be used as a subquery or nested in procedural logic.
+ *
+ * @see DSLContext#dropTypeIfExists(Name...)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ public static org.jooq.DropTypeStep dropTypeIfExists(Name... types) {
+ return dsl().dropTypeIfExists(types);
+ }
+
+ /**
+ * The DROP TYPE IF EXISTS statement.
+ *
+ * Unlike statement construction methods in the {@link DSLContext} API, this
+ * creates an unattached, and thus not directly renderable or executable
+ * statement. It can be used as a subquery or nested in procedural logic.
+ *
+ * @see DSLContext#dropTypeIfExists(Type...)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ public static org.jooq.DropTypeStep dropTypeIfExists(Type>... types) {
+ return dsl().dropTypeIfExists(types);
+ }
+
+ /**
+ * The DROP TYPE IF EXISTS statement.
+ *
+ * Unlike statement construction methods in the {@link DSLContext} API, this
+ * creates an unattached, and thus not directly renderable or executable
+ * statement. It can be used as a subquery or nested in procedural logic.
+ *
+ * @see DSLContext#dropTypeIfExists(Collection)
+ */
+ @NotNull @CheckReturnValue
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ public static org.jooq.DropTypeStep dropTypeIfExists(Collection extends Type>> types) {
+ return dsl().dropTypeIfExists(types);
+ }
/**
* The
diff --git a/jOOQ/src/main/java/org/jooq/impl/DefaultDSLContext.java b/jOOQ/src/main/java/org/jooq/impl/DefaultDSLContext.java
index 86a28b55e2..fead41128d 100644
--- a/jOOQ/src/main/java/org/jooq/impl/DefaultDSLContext.java
+++ b/jOOQ/src/main/java/org/jooq/impl/DefaultDSLContext.java
@@ -108,7 +108,6 @@ import org.jooq.ConnectionProvider;
import org.jooq.ConnectionRunnable;
import org.jooq.ContextTransactionalCallable;
import org.jooq.ContextTransactionalRunnable;
-import org.jooq.CreateTypeStep;
import org.jooq.CreateViewAsStep;
import org.jooq.Cursor;
import org.jooq.DDLExportConfiguration;
@@ -118,7 +117,6 @@ import org.jooq.DataType;
import org.jooq.DeleteQuery;
import org.jooq.DeleteUsingStep;
import org.jooq.Domain;
-import org.jooq.DropTypeStep;
import org.jooq.ExecuteContext;
import org.jooq.ExecuteListener;
import org.jooq.Explain;
@@ -234,6 +232,7 @@ import org.jooq.TransactionProvider;
import org.jooq.TransactionalCallable;
import org.jooq.TransactionalPublishable;
import org.jooq.TransactionalRunnable;
+import org.jooq.Type;
import org.jooq.UDT;
import org.jooq.UDTRecord;
import org.jooq.UpdatableRecord;
@@ -3418,6 +3417,21 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
+
+ @Override
+ public org.jooq.CreateTypeStep createType(@Stringly.Name String type) {
+ return new CreateTypeImpl(configuration(), DSL.type(DSL.name(type)));
+ }
+
+ @Override
+ public org.jooq.CreateTypeStep createType(Name type) {
+ return new CreateTypeImpl(configuration(), DSL.type(type));
+ }
+
+ @Override
+ public org.jooq.CreateTypeStep createType(Type> type) {
+ return new CreateTypeImpl(configuration(), type);
+ }
@Override
public org.jooq.CreateSchemaFinalStep createSchema(@Stringly.Name String schema) {
@@ -3772,6 +3786,76 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
+
+ @Override
+ public org.jooq.DropTypeStep dropType(@Stringly.Name String types) {
+ return new DropTypeImpl(configuration(), Arrays.asList(DSL.type(types)), false);
+ }
+
+ @Override
+ public org.jooq.DropTypeStep dropType(Name types) {
+ return new DropTypeImpl(configuration(), Arrays.asList(DSL.type(types)), false);
+ }
+
+ @Override
+ public org.jooq.DropTypeStep dropType(Type> types) {
+ return new DropTypeImpl(configuration(), Arrays.asList(types), false);
+ }
+
+ @Override
+ public org.jooq.DropTypeStep dropType(String... types) {
+ return new DropTypeImpl(configuration(), Tools.map(types, e -> DSL.type(e)), false);
+ }
+
+ @Override
+ public org.jooq.DropTypeStep dropType(Name... types) {
+ return new DropTypeImpl(configuration(), Tools.map(types, e -> DSL.type(e)), false);
+ }
+
+ @Override
+ public org.jooq.DropTypeStep dropType(Type>... types) {
+ return new DropTypeImpl(configuration(), Arrays.asList(types), false);
+ }
+
+ @Override
+ public org.jooq.DropTypeStep dropType(Collection extends Type>> types) {
+ return new DropTypeImpl(configuration(), new QueryPartList<>(types), false);
+ }
+
+ @Override
+ public org.jooq.DropTypeStep dropTypeIfExists(@Stringly.Name String types) {
+ return new DropTypeImpl(configuration(), Arrays.asList(DSL.type(types)), true);
+ }
+
+ @Override
+ public org.jooq.DropTypeStep dropTypeIfExists(Name types) {
+ return new DropTypeImpl(configuration(), Arrays.asList(DSL.type(types)), true);
+ }
+
+ @Override
+ public org.jooq.DropTypeStep dropTypeIfExists(Type> types) {
+ return new DropTypeImpl(configuration(), Arrays.asList(types), true);
+ }
+
+ @Override
+ public org.jooq.DropTypeStep dropTypeIfExists(String... types) {
+ return new DropTypeImpl(configuration(), Tools.map(types, e -> DSL.type(e)), true);
+ }
+
+ @Override
+ public org.jooq.DropTypeStep dropTypeIfExists(Name... types) {
+ return new DropTypeImpl(configuration(), Tools.map(types, e -> DSL.type(e)), true);
+ }
+
+ @Override
+ public org.jooq.DropTypeStep dropTypeIfExists(Type>... types) {
+ return new DropTypeImpl(configuration(), Arrays.asList(types), true);
+ }
+
+ @Override
+ public org.jooq.DropTypeStep dropTypeIfExists(Collection extends Type>> types) {
+ return new DropTypeImpl(configuration(), new QueryPartList<>(types), true);
+ }
@Override
public org.jooq.DropViewFinalStep dropView(@Stringly.Name String view) {
@@ -4199,66 +4283,6 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
return new CreateViewImpl<>(configuration(), view, fieldNameFunction, true, false);
}
- @Override
- public CreateTypeStep createType(String type) {
- return createType(name(type));
- }
-
- @Override
- public CreateTypeStep createType(Name type) {
- return new CreateTypeImpl(configuration(), type);
- }
-
- @Override
- public DropTypeStep dropType(String type) {
- return dropType(name(type));
- }
-
- @Override
- public DropTypeStep dropType(Name type) {
- return dropType(Arrays.asList(type));
- }
-
- @Override
- public DropTypeStep dropType(String... type) {
- return dropType(Tools.names(type));
- }
-
- @Override
- public DropTypeStep dropType(Name... type) {
- return dropType(Arrays.asList(type));
- }
-
- @Override
- public DropTypeStep dropType(Collection> type) {
- return new DropTypeImpl(configuration(), type, false);
- }
-
- @Override
- public DropTypeStep dropTypeIfExists(String type) {
- return dropTypeIfExists(name(type));
- }
-
- @Override
- public DropTypeStep dropTypeIfExists(Name type) {
- return dropTypeIfExists(Arrays.asList(type));
- }
-
- @Override
- public DropTypeStep dropTypeIfExists(String... type) {
- return dropTypeIfExists(Tools.names(type));
- }
-
- @Override
- public DropTypeStep dropTypeIfExists(Name... type) {
- return dropTypeIfExists(Arrays.asList(type));
- }
-
- @Override
- public DropTypeStep dropTypeIfExists(Collection> type) {
- return new DropTypeImpl(configuration(), type, true);
- }
-
@Override
public AlterTableStep alterTable(String table) {
return alterTable(name(table));
diff --git a/jOOQ/src/main/java/org/jooq/impl/DropTypeImpl.java b/jOOQ/src/main/java/org/jooq/impl/DropTypeImpl.java
index f26df788d3..67237843ca 100644
--- a/jOOQ/src/main/java/org/jooq/impl/DropTypeImpl.java
+++ b/jOOQ/src/main/java/org/jooq/impl/DropTypeImpl.java
@@ -37,71 +37,94 @@
*/
package org.jooq.impl;
-import static org.jooq.impl.Keywords.K_CASCADE;
-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_TYPE;
+import static org.jooq.impl.DSL.*;
+import static org.jooq.impl.Internal.*;
+import static org.jooq.impl.Keywords.*;
+import static org.jooq.impl.Names.*;
+import static org.jooq.impl.SQLDataType.*;
+import static org.jooq.impl.Tools.*;
+import static org.jooq.impl.Tools.BooleanDataKey.*;
+import static org.jooq.impl.Tools.ExtendedDataKey.*;
+import static org.jooq.impl.Tools.SimpleDataKey.*;
+import static org.jooq.SQLDialect.*;
-import java.util.Collection;
-import java.util.function.BiFunction;
-import java.util.function.Predicate;
-
-import org.jooq.Configuration;
-import org.jooq.Context;
-import org.jooq.DropTypeFinalStep;
-import org.jooq.DropTypeStep;
-import org.jooq.Field;
+import org.jooq.*;
import org.jooq.Function1;
-import org.jooq.Name;
-import org.jooq.impl.QOM.Cascade;
-import org.jooq.impl.QOM.DropType;
-import org.jooq.impl.QOM.UnmodifiableList;
-import org.jooq.QueryPart;
-// ...
-// ...
+import org.jooq.Record;
+import org.jooq.conf.*;
+import org.jooq.impl.*;
+import org.jooq.impl.QOM.*;
+import org.jooq.tools.*;
+
+import java.util.*;
+import java.util.function.*;
+import java.util.stream.*;
+
/**
- * @author Lukas Eder
+ * The DROP VIEW statement.
@@ -10720,138 +10976,6 @@ public class DSL {
return dsl().createViewIfNotExists(view, fieldNameFunction);
}
- /**
- * Create a new DSL CREATE TYPE statement.
- *
- * @see DSLContext#createType(String)
- */
- @NotNull
- @Support({ H2, POSTGRES, YUGABYTEDB })
- public static CreateTypeStep createType(String type) {
- return dsl().createType(type);
- }
-
- /**
- * Create a new DSL CREATE TYPE statement.
- *
- * @see DSLContext#createType(Name)
- */
- @NotNull
- @Support({ H2, POSTGRES, YUGABYTEDB })
- public static CreateTypeStep createType(Name type) {
- return dsl().createType(type);
- }
-
- /**
- * Create a new DSL DROP TYPE statement.
- *
- * @see DSL#dropType(String)
- */
- @NotNull
- @Support({ H2, POSTGRES, YUGABYTEDB })
- public static DropTypeStep dropType(String type) {
- return dsl().dropType(type);
- }
-
- /**
- * Create a new DSL DROP TYPE statement.
- *
- * @see DSL#dropType(Name)
- */
- @NotNull
- @Support({ H2, POSTGRES, YUGABYTEDB })
- public static DropTypeStep dropType(Name type) {
- return dsl().dropType(type);
- }
-
- /**
- * Create a new DSL DROP TYPE statement.
- *
- * @see DSL#dropType(String...)
- */
- @NotNull
- @Support({ H2, POSTGRES, YUGABYTEDB })
- public static DropTypeStep dropType(String... type) {
- return dsl().dropType(type);
- }
-
- /**
- * Create a new DSL DROP TYPE statement.
- *
- * @see DSL#dropType(Name...)
- */
- @NotNull
- @Support({ H2, POSTGRES, YUGABYTEDB })
- public static DropTypeStep dropType(Name... type) {
- return dsl().dropType(type);
- }
-
- /**
- * Create a new DSL DROP TYPE statement.
- *
- * @see DSL#dropType(Collection)
- */
- @NotNull
- @Support({ H2, POSTGRES, YUGABYTEDB })
- public static DropTypeStep dropType(Collection> type) {
- return dsl().dropType(type);
- }
-
- /**
- * Create a new DSL DROP TYPE statement.
- *
- * @see DSL#dropTypeIfExists(String)
- */
- @NotNull
- @Support({ H2, POSTGRES, YUGABYTEDB })
- public static DropTypeStep dropTypeIfExists(String type) {
- return dsl().dropTypeIfExists(type);
- }
-
- /**
- * Create a new DSL DROP TYPE statement.
- *
- * @see DSL#dropTypeIfExists(Name)
- */
- @NotNull
- @Support({ H2, POSTGRES, YUGABYTEDB })
- public static DropTypeStep dropTypeIfExists(Name type) {
- return dsl().dropTypeIfExists(type);
- }
-
- /**
- * Create a new DSL DROP TYPE statement.
- *
- * @see DSL#dropTypeIfExists(String...)
- */
- @NotNull
- @Support({ H2, POSTGRES, YUGABYTEDB })
- public static DropTypeStep dropTypeIfExists(String... type) {
- return dsl().dropTypeIfExists(type);
- }
-
- /**
- * Create a new DSL DROP TYPE statement.
- *
- * @see DSL#dropTypeIfExists(Name...)
- */
- @NotNull
- @Support({ H2, POSTGRES, YUGABYTEDB })
- public static DropTypeStep dropTypeIfExists(Name... type) {
- return dsl().dropTypeIfExists(type);
- }
-
- /**
- * Create a new DSL DROP TYPE statement.
- *
- * @see DSL#dropTypeIfExists(Collection)
- */
- @NotNull
- @Support({ H2, POSTGRES, YUGABYTEDB })
- public static DropTypeStep dropTypeIfExists(Collection> type) {
- return dsl().dropTypeIfExists(type);
- }
-
/**
* Create a new DSL ALTER TABLE statement.
*
@@ -12606,6 +12730,42 @@ public class DSL {
);
}
+ /**
+ * Create a qualified type, given its type name.
+ */
+ @NotNull
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ public static Type> type(@Stringly.Name String name) {
+ return type(name(name));
+ }
+
+ /**
+ * Create a qualified type, given its type name.
+ */
+ @NotNull
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ public static Type> type(Name name) {
+ return type(name, SQLDataType.OTHER);
+ }
+
+ /**
+ * Create a qualified type, given its type name.
+ */
+ @NotNull
+ @Support({ H2, POSTGRES, YUGABYTEDB })
+ public static DROP TYPE statement.
*/
+@SuppressWarnings({ "rawtypes", "unused" })
final class DropTypeImpl
extends
AbstractDDLQuery
implements
+ QOM.DropType,
DropTypeStep,
- DropType
+ DropTypeFinalStep
{
- private final QueryPartListCREATE TYPE statement.
- */
- public /*sealed*/ interface CreateType
- extends
- DDLQuery
- /*permits
- CreateTypeImpl*/
- {
- @NotNull Name $name();
- @NotNull UnmodifiableList extends FieldDROP TYPE statement.
- */
- public /*sealed*/ interface DropType
- extends
- DDLQuery
- /*permits
- DropTypeImpl*/
- {
- @NotNull UnmodifiableList extends Name> $names();
- boolean $ifExists();
- @Nullable Cascade $cascade();
- }
-
/**
* The CREATE VIEW statement.
*/
@@ -2288,6 +2257,23 @@ public final class QOM {
+
+ /**
+ * The CREATE TYPE statement.
+ */
+ public /*sealed*/ interface CreateType
+ extends
+ DDLQuery
+ //permits
+ // CreateTypeImpl
+ {
+ @NotNull Type> $type();
+ @NotNull UnmodifiableList extends FieldCREATE SCHEMA statement.
@@ -2529,6 +2515,26 @@ public final class QOM {
+
+ /**
+ * The DROP TYPE statement.
+ */
+ public /*sealed*/ interface DropType
+ extends
+ DDLQuery
+ //permits
+ // DropTypeImpl
+ {
+ @NotNull UnmodifiableList extends Type>> $types();
+ boolean $ifExists();
+ @Nullable Cascade $cascade();
+ @CheckReturnValue
+ @NotNull DropType $types(Collection extends Type>> types);
+ @CheckReturnValue
+ @NotNull DropType $ifExists(boolean ifExists);
+ @CheckReturnValue
+ @NotNull DropType $cascade(Cascade cascade);
+ }
/**
* The DROP VIEW statement.
diff --git a/jOOQ/src/main/java/org/jooq/impl/TypeImpl.java b/jOOQ/src/main/java/org/jooq/impl/TypeImpl.java
new file mode 100644
index 0000000000..4871972306
--- /dev/null
+++ b/jOOQ/src/main/java/org/jooq/impl/TypeImpl.java
@@ -0,0 +1,64 @@
+/*
+ * 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
+ *
+ * https://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: https://www.jooq.org/legal/licensing
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+package org.jooq.impl;
+
+import org.jooq.Comment;
+import org.jooq.Context;
+import org.jooq.DataType;
+import org.jooq.Name;
+import org.jooq.Type;
+import org.jooq.impl.QOM.UNotYetImplemented;
+
+/**
+ * @author Lukas Eder
+ */
+class TypeImpl