From bb248cf4e0cc37d6c683aaad44522c8afd905f69 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Tue, 6 Jul 2021 21:07:35 +0200 Subject: [PATCH] [jOOQ/jOOQ#12109] Remove pre 3.6 deprecated API --- jOOQ/src/main/java/org/jooq/Allow.java | 2 - jOOQ/src/main/java/org/jooq/Result.java | 7 - jOOQ/src/main/java/org/jooq/SQLDialect.java | 9 - jOOQ/src/main/java/org/jooq/impl/DSL.java | 311 ------------------ .../main/java/org/jooq/impl/ResultImpl.java | 6 - 5 files changed, 335 deletions(-) diff --git a/jOOQ/src/main/java/org/jooq/Allow.java b/jOOQ/src/main/java/org/jooq/Allow.java index 287270fb32..8b9722cd6f 100644 --- a/jOOQ/src/main/java/org/jooq/Allow.java +++ b/jOOQ/src/main/java/org/jooq/Allow.java @@ -67,7 +67,6 @@ import static org.jooq.SQLDialect.MYSQL; import static org.jooq.SQLDialect.POSTGRES; // ... // ... -import static org.jooq.SQLDialect.SQL99; // ... import static org.jooq.SQLDialect.SQLITE; // ... @@ -180,7 +179,6 @@ public @interface Allow { CUBRID, DEFAULT, - SQL99, DERBY, FIREBIRD, H2, diff --git a/jOOQ/src/main/java/org/jooq/Result.java b/jOOQ/src/main/java/org/jooq/Result.java index 7ecfa2de20..4e254f95bd 100644 --- a/jOOQ/src/main/java/org/jooq/Result.java +++ b/jOOQ/src/main/java/org/jooq/Result.java @@ -2182,13 +2182,6 @@ public interface Result extends Fields, List, Attachable, F @NotNull Map> intoGroups(Table table, RecordMapper mapper) throws IllegalArgumentException, MappingException; - /** - * @deprecated - 3.6.0 - [#3879] - Use {@link #intoArrays()} instead. - */ - @NotNull - @Deprecated(forRemoval = true, since = "3.6") - Object[][] intoArray(); - /** * Convert this result into an array of arrays. *

diff --git a/jOOQ/src/main/java/org/jooq/SQLDialect.java b/jOOQ/src/main/java/org/jooq/SQLDialect.java index f5cdd1f840..53a2d0a414 100644 --- a/jOOQ/src/main/java/org/jooq/SQLDialect.java +++ b/jOOQ/src/main/java/org/jooq/SQLDialect.java @@ -77,15 +77,6 @@ import org.jetbrains.annotations.Nullable; */ public enum SQLDialect { - /** - * The standard SQL dialect family. - * - * @deprecated - [#3844] - 3.6.0 - {@link #DEFAULT} will replace this - * pseudo-dialect. - */ - @Deprecated - SQL99("", false, false), - /** * The default SQL dialect. *

diff --git a/jOOQ/src/main/java/org/jooq/impl/DSL.java b/jOOQ/src/main/java/org/jooq/impl/DSL.java index 0bcdb86174..360fe94db4 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DSL.java +++ b/jOOQ/src/main/java/org/jooq/impl/DSL.java @@ -11780,30 +11780,6 @@ public class DSL { return default_(field.getDataType()); } - /** - * Create a qualified schema, given its schema name. - *

- * This constructs a schema reference given the schema's qualified name. - *

- * Example:

-     * // This schema...
-     * schemaByName("MY_SCHEMA");
-     *
-     * // ... will render this SQL by default, using the SQL Server dialect
-     * [MY_SCHEMA]
-     * 
- * - * @param name The schema's reference name. - * @return A schema referenced by name - * @deprecated - [#3843] - 3.6.0 - use {@link #schema(Name)} instead - */ - @Deprecated(forRemoval = true, since = "3.6") - @NotNull - @Support - public static Schema schemaByName(String name) { - return new SchemaImpl(name); - } - /** * Create a qualified catalog, given its catalog name. *

@@ -11880,83 +11856,6 @@ public class DSL { return new SchemaImpl(name); } - /** - * Create a qualified sequence, given its sequence name. - *

- * This constructs a sequence reference given the sequence's qualified name. - *

- * Example:

-     * // This sequence...
-     * sequenceByName("MY_SCHEMA", "MY_SEQUENCE");
-     *
-     * // ... will render this SQL by default, using the SQL Server dialect
-     * [MY_SCHEMA].[MY_SEQUENCE]
-     * 
- * - * @param qualifiedName The various parts making up your sequence's - * reference name. - * @return A sequence referenced by sequenceName - * @deprecated - [#3843] - 3.6.0 - use {@link #sequence(Name)} instead - */ - @Deprecated(forRemoval = true, since = "3.6") - @NotNull - @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, POSTGRES }) - public static Sequence sequenceByName(String... qualifiedName) { - return sequenceByName(BigInteger.class, qualifiedName); - } - - /** - * Create a qualified sequence, given its sequence name. - *

- * This constructs a sequence reference given the sequence's qualified name. - *

- * Example:

-     * // This sequence...
-     * sequenceByName("MY_SCHEMA", "MY_SEQUENCE");
-     *
-     * // ... will render this SQL by default, using the SQL Server dialect
-     * [MY_SCHEMA].[MY_SEQUENCE]
-     * 
- * - * @param qualifiedName The various parts making up your sequence's - * reference name. - * @param type The type of the returned field - * @return A sequence referenced by sequenceName - * @deprecated - [#3843] - 3.6.0 - use {@link #sequence(Name, Class)} instead - */ - @Deprecated(forRemoval = true, since = "3.6") - @NotNull - @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, POSTGRES }) - public static Sequence sequenceByName(Class type, String... qualifiedName) { - return sequenceByName(getDataType(type), qualifiedName); - } - - /** - * Create a qualified sequence, given its sequence name. - *

- * This constructs a sequence reference given the sequence's qualified name. - *

- * Example:

-     * // This sequence...
-     * sequenceByName("MY_SCHEMA", "MY_SEQUENCE");
-     *
-     * // ... will render this SQL by default, using the SQL Server dialect
-     * [MY_SCHEMA].[MY_SEQUENCE]
-     * 
- * - * @param qualifiedName The various parts making up your sequence's - * reference name. - * @param type The type of the returned field - * @return A sequence referenced by sequenceName - * @deprecated - [#3843] - 3.6.0 - use {@link #sequence(Name, DataType)} instead - */ - @Deprecated(forRemoval = true, since = "3.6") - @NotNull - @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, POSTGRES }) - public static Sequence sequenceByName(DataType type, String... qualifiedName) { - return sequence(name(qualifiedName), type); - } - /** * Create a qualified sequence, given its sequence name. *

@@ -12019,31 +11918,6 @@ public class DSL { ); } - /** - * Create a qualified table, given its table name. - *

- * This constructs a table reference given the table's qualified name. jOOQ - *

- * Example:

-     * // This table...
-     * tableByName("MY_SCHEMA", "MY_TABLE");
-     *
-     * // ... will render this SQL by default, using the SQL Server dialect
-     * [MY_SCHEMA].[MY_TABLE]
-     * 
- * - * @param qualifiedName The various parts making up your table's reference - * name. - * @return A table referenced by tableName - * @deprecated - [#3843] - 3.6.0 - use {@link #table(Name)} instead - */ - @Deprecated(forRemoval = true, since = "3.6") - @NotNull - @Support - public static Table tableByName(String... qualifiedName) { - return table(name(qualifiedName)); - } - /** * Create a qualified table, given its table name. *

@@ -12088,110 +11962,6 @@ public class DSL { return new TableImpl<>(name, null, null, null, comment); } - /** - * Create a qualified field, given its (qualified) field name. - *

- * This constructs a field reference given the field's qualified name. jOOQ - *

- * Example:

-     * // This field...
-     * fieldByName("MY_SCHEMA", "MY_TABLE", "MY_FIELD");
-     *
-     * // ... will render this SQL by default, using the SQL Server dialect
-     * [MY_SCHEMA].[MY_TABLE].[MY_FIELD]
-     * 
- *

- * Another example:

-     * create.select(field("length({1})", Integer.class, fieldByName("TITLE")))
-     *       .from(tableByName("T_BOOK"))
-     *       .fetch();
-     *
-     * // ... will execute this SQL on SQL Server:
-     * select length([TITLE]) from [T_BOOK]
-     * 
- * - * @param qualifiedName The various parts making up your field's reference - * name. - * @return A field referenced by fieldName - * @deprecated - [#3843] - 3.6.0 - use {@link #field(Name)} instead - */ - @Deprecated(forRemoval = true, since = "3.6") - @NotNull - @Support - public static Field fieldByName(String... qualifiedName) { - return fieldByName(Object.class, qualifiedName); - } - - /** - * Create a qualified field, given its (qualified) field name. - *

- * This constructs a field reference given the field's qualified name. jOOQ - *

- * Example:

-     * // This field...
-     * fieldByName("MY_SCHEMA", "MY_TABLE", "MY_FIELD");
-     *
-     * // ... will render this SQL by default, using the SQL Server dialect
-     * [MY_SCHEMA].[MY_TABLE].[MY_FIELD]
-     * 
- *

- * Another example:

-     * create.select(field("length({1})", Integer.class, fieldByName("TITLE")))
-     *       .from(tableByName("T_BOOK"))
-     *       .fetch();
-     *
-     * // ... will execute this SQL on SQL Server:
-     * select length([TITLE]) from [T_BOOK]
-     * 
- * - * @param qualifiedName The various parts making up your field's reference - * name. - * @param type The type of the returned field - * @return A field referenced by fieldName - * @deprecated - [#3843] - 3.6.0 - use {@link #field(Name, Class)} instead - */ - @Deprecated(forRemoval = true, since = "3.6") - @NotNull - @Support - public static Field fieldByName(Class type, String... qualifiedName) { - return fieldByName(getDataType(type), qualifiedName); - } - - /** - * Create a qualified field, given its (qualified) field name. - *

- * This constructs a field reference given the field's qualified name. jOOQ - *

- * Example:

-     * // This field...
-     * fieldByName("MY_SCHEMA", "MY_TABLE", "MY_FIELD");
-     *
-     * // ... will render this SQL by default, using the SQL Server dialect
-     * [MY_SCHEMA].[MY_TABLE].[MY_FIELD]
-     * 
- *

- * Another example:

-     * create.select(field("length({1})", Integer.class, fieldByName("TITLE")))
-     *       .from(tableByName("T_BOOK"))
-     *       .fetch();
-     *
-     * // ... will execute this SQL on SQL Server:
-     * select length([TITLE]) from [T_BOOK]
-     * 
- * - * @param qualifiedName The various parts making up your field's reference - * name. - * @param type The type of the returned field - * @return A field referenced by fieldName - * @deprecated - [#3843] - 3.6.0 - use {@link #field(Name, DataType)} instead - */ - @Deprecated(forRemoval = true, since = "3.6") - @NotNull - @Support - public static Field fieldByName(DataType type, String... qualifiedName) { - return field(name(qualifiedName), type); - } - /** * Create a qualified field, given its (qualified) field name. *

@@ -13121,87 +12891,6 @@ public class DSL { return new SQLImpl(sql, bindings); } - /** - * A custom SQL clause that can render arbitrary expressions. - *

- * A plain SQL QueryPart is a QueryPart that can - * contain user-defined plain SQL, because sometimes it is easier to express - * things directly in SQL. - *

- * NOTE: When inserting plain SQL into jOOQ objects, you must - * guarantee syntax integrity. You may also create the possibility of - * malicious SQL injection. Be sure to properly use bind variables and/or - * escape literals when concatenated into SQL clauses! - * - * @param sql The SQL - * @return A query part wrapping the plain SQL - * @deprecated - 3.6.0 - [#3854] - Use {@link #sql(String)} instead - * @see SQL - */ - @Deprecated(forRemoval = true, since = "3.6") - @NotNull - @Support - @PlainSQL - public static QueryPart queryPart(String sql) { - return sql(sql); - } - - /** - * A custom SQL clause that can render arbitrary expressions. - *

- * A plain SQL QueryPart is a QueryPart that can - * contain user-defined plain SQL, because sometimes it is easier to express - * things directly in SQL. - *

- * NOTE: When inserting plain SQL into jOOQ objects, you must - * guarantee syntax integrity. You may also create the possibility of - * malicious SQL injection. Be sure to properly use bind variables and/or - * escape literals when concatenated into SQL clauses! - * - * @param sql The SQL clause, containing {numbered placeholders} where query - * parts can be injected - * @param parts The {@link QueryPart} objects that are rendered at the - * {numbered placeholder} locations - * @return A query part wrapping the plain SQL - * @deprecated - 3.6.0 - [#3854] - Use {@link #sql(String, QueryPart...)} instead - * @see SQL - * @see DSL#sql(String, QueryPart...) - */ - @Deprecated(forRemoval = true, since = "3.6") - @NotNull - @Support - @PlainSQL - public static QueryPart queryPart(String sql, QueryPart... parts) { - return sql(sql, parts); - } - - /** - * A custom SQL clause that can render arbitrary expressions. - *

- * A plain SQL QueryPart is a QueryPart that can - * contain user-defined plain SQL, because sometimes it is easier to express - * things directly in SQL. There must be as many bind variables contained - * in the SQL, as passed in the bindings parameter - *

- * NOTE: When inserting plain SQL into jOOQ objects, you must - * guarantee syntax integrity. You may also create the possibility of - * malicious SQL injection. Be sure to properly use bind variables and/or - * escape literals when concatenated into SQL clauses! - * - * @param sql The SQL - * @return A query part wrapping the plain SQL - * @deprecated - 3.6.0 - [#3854] - Use {@link #sql(String, Object...)} instead - * @see SQL - * @see DSL#sql(String, Object...) - */ - @Deprecated(forRemoval = true, since = "3.6") - @NotNull - @Support - @PlainSQL - public static QueryPart queryPart(String sql, Object... bindings) { - return sql(sql, bindings); - } - // ------------------------------------------------------------------------- // XXX Plain SQL API // ------------------------------------------------------------------------- diff --git a/jOOQ/src/main/java/org/jooq/impl/ResultImpl.java b/jOOQ/src/main/java/org/jooq/impl/ResultImpl.java index 6cf8c425f8..d1d710e90b 100644 --- a/jOOQ/src/main/java/org/jooq/impl/ResultImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/ResultImpl.java @@ -664,12 +664,6 @@ final class ResultImpl extends AbstractResult implements Re return collect(Records.intoGroups(recordType().mapper(table), mapper)); } - @Override - @Deprecated - public final Object[][] intoArray() { - return intoArrays(); - } - @Override public final Object[][] intoArrays() { return collect(Records.intoArray(new Object[0][], R::intoArray));