[#7008] Supported DROP and CREATE SCHEMA for MariaDB
This commit is contained in:
parent
b9f4cffd15
commit
98634f9be3
@ -439,7 +439,11 @@ public interface AlterTableStep {
|
||||
* <p>
|
||||
* This is an alias for {@link #dropColumns(Collection)}.
|
||||
*/
|
||||
@Support({ H2, FIREBIRD })
|
||||
<<<<<<< HEAD
|
||||
@Support({ H2, FIREBIRD, MARIADB, MYSQL })
|
||||
=======
|
||||
@Support({ H2, FIREBIRD, MARIADB })
|
||||
>>>>>>> branch 'master' of https://lukaseder@bitbucket.org/lukaseder/jooq.git
|
||||
AlterTableDropStep drop(Field<?>... fields);
|
||||
|
||||
/**
|
||||
@ -448,7 +452,11 @@ public interface AlterTableStep {
|
||||
* <p>
|
||||
* This is an alias for {@link #dropColumns(Collection)}.
|
||||
*/
|
||||
@Support({ H2, FIREBIRD })
|
||||
<<<<<<< HEAD
|
||||
@Support({ H2, FIREBIRD, MARIADB, MYSQL })
|
||||
=======
|
||||
@Support({ H2, FIREBIRD, MARIADB })
|
||||
>>>>>>> branch 'master' of https://lukaseder@bitbucket.org/lukaseder/jooq.git
|
||||
AlterTableDropStep drop(Name... fields);
|
||||
|
||||
/**
|
||||
@ -457,28 +465,44 @@ public interface AlterTableStep {
|
||||
* <p>
|
||||
* This is an alias for {@link #dropColumns(Collection)}.
|
||||
*/
|
||||
@Support({ H2, FIREBIRD })
|
||||
<<<<<<< HEAD
|
||||
@Support({ H2, FIREBIRD, MARIADB, MYSQL })
|
||||
=======
|
||||
@Support({ H2, FIREBIRD, MARIADB })
|
||||
>>>>>>> branch 'master' of https://lukaseder@bitbucket.org/lukaseder/jooq.git
|
||||
AlterTableDropStep drop(String... fields);
|
||||
|
||||
/**
|
||||
* Add an <code>DROP COLUMN</code> clause to the <code>ALTER TABLE</code>
|
||||
* statement.
|
||||
*/
|
||||
@Support({ H2, FIREBIRD })
|
||||
<<<<<<< HEAD
|
||||
@Support({ H2, FIREBIRD, MARIADB, MYSQL })
|
||||
=======
|
||||
@Support({ H2, FIREBIRD, MARIADB })
|
||||
>>>>>>> branch 'master' of https://lukaseder@bitbucket.org/lukaseder/jooq.git
|
||||
AlterTableDropStep dropColumns(Field<?>... fields);
|
||||
|
||||
/**
|
||||
* Add an <code>DROP COLUMN</code> clause to the <code>ALTER TABLE</code>
|
||||
* statement.
|
||||
*/
|
||||
@Support({ H2, FIREBIRD })
|
||||
<<<<<<< HEAD
|
||||
@Support({ H2, FIREBIRD, MARIADB, MYSQL })
|
||||
=======
|
||||
@Support({ H2, FIREBIRD, MARIADB })
|
||||
>>>>>>> branch 'master' of https://lukaseder@bitbucket.org/lukaseder/jooq.git
|
||||
AlterTableDropStep dropColumns(Name... fields);
|
||||
|
||||
/**
|
||||
* Add an <code>DROP COLUMN</code> clause to the <code>ALTER TABLE</code>
|
||||
* statement.
|
||||
*/
|
||||
@Support({ H2, FIREBIRD })
|
||||
<<<<<<< HEAD
|
||||
@Support({ H2, FIREBIRD, MARIADB, MYSQL })
|
||||
=======
|
||||
@Support({ H2, FIREBIRD, MARIADB })
|
||||
>>>>>>> branch 'master' of https://lukaseder@bitbucket.org/lukaseder/jooq.git
|
||||
AlterTableDropStep dropColumns(String... fields);
|
||||
|
||||
/**
|
||||
@ -487,14 +511,22 @@ public interface AlterTableStep {
|
||||
* <p>
|
||||
* This is an alias for {@link #dropColumns(Collection)}.
|
||||
*/
|
||||
@Support({ H2, FIREBIRD })
|
||||
<<<<<<< HEAD
|
||||
@Support({ H2, FIREBIRD, MARIADB, MYSQL })
|
||||
=======
|
||||
@Support({ H2, FIREBIRD, MARIADB })
|
||||
>>>>>>> branch 'master' of https://lukaseder@bitbucket.org/lukaseder/jooq.git
|
||||
AlterTableDropStep drop(Collection<? extends Field<?>> fields);
|
||||
|
||||
/**
|
||||
* Add an <code>DROP COLUMN</code> clause to the <code>ALTER TABLE</code>
|
||||
* statement.
|
||||
*/
|
||||
@Support({ H2, FIREBIRD })
|
||||
<<<<<<< HEAD
|
||||
@Support({ H2, FIREBIRD, MARIADB, MYSQL })
|
||||
=======
|
||||
@Support({ H2, FIREBIRD, MARIADB })
|
||||
>>>>>>> branch 'master' of https://lukaseder@bitbucket.org/lukaseder/jooq.git
|
||||
AlterTableDropStep dropColumns(Collection<? extends Field<?>> fields);
|
||||
|
||||
/**
|
||||
|
||||
@ -60,6 +60,11 @@ import static org.jooq.SQLDialect.DERBY;
|
||||
import static org.jooq.SQLDialect.FIREBIRD;
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.HSQLDB;
|
||||
import static org.jooq.SQLDialect.MARIADB;
|
||||
<<<<<<< HEAD
|
||||
import static org.jooq.SQLDialect.MYSQL;
|
||||
=======
|
||||
>>>>>>> branch 'master' of https://lukaseder@bitbucket.org/lukaseder/jooq.git
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.POSTGRES;
|
||||
// ...
|
||||
@ -163,11 +168,16 @@ final class AlterTableImpl extends AbstractQuery implements
|
||||
/**
|
||||
* Generated UID
|
||||
*/
|
||||
private static final long serialVersionUID = 8904572826501186329L;
|
||||
private static final Clause[] CLAUSES = { ALTER_TABLE };
|
||||
private static final EnumSet<SQLDialect> NO_SUPPORT_IF_EXISTS = EnumSet.of(CUBRID, DERBY, FIREBIRD);
|
||||
private static final EnumSet<SQLDialect> SUPPORT_RENAME_TABLE = EnumSet.of(DERBY);
|
||||
private static final EnumSet<SQLDialect> NO_SUPPORT_ALTER_TYPE_AND_NULL = EnumSet.of(POSTGRES);
|
||||
private static final long serialVersionUID = 8904572826501186329L;
|
||||
private static final Clause[] CLAUSES = { ALTER_TABLE };
|
||||
private static final EnumSet<SQLDialect> NO_SUPPORT_IF_EXISTS = EnumSet.of(CUBRID, DERBY, FIREBIRD);
|
||||
private static final EnumSet<SQLDialect> SUPPORT_RENAME_TABLE = EnumSet.of(DERBY);
|
||||
private static final EnumSet<SQLDialect> NO_SUPPORT_ALTER_TYPE_AND_NULL = EnumSet.of(POSTGRES);
|
||||
<<<<<<< HEAD
|
||||
private static final EnumSet<SQLDialect> REQUIRE_REPEAT_KEYWORD_ON_MULTI_ALTER = EnumSet.of(FIREBIRD, MARIADB, MYSQL);
|
||||
=======
|
||||
private static final EnumSet<SQLDialect> REQUIRE_REPEAT_KEYWORD_ON_MULTI_ALTER = EnumSet.of(FIREBIRD, MARIADB);
|
||||
>>>>>>> branch 'master' of https://lukaseder@bitbucket.org/lukaseder/jooq.git
|
||||
|
||||
|
||||
|
||||
@ -988,7 +998,7 @@ final class AlterTableImpl extends AbstractQuery implements
|
||||
else if (dropColumns != null) {
|
||||
ctx.start(ALTER_TABLE_DROP);
|
||||
|
||||
if (family == FIREBIRD) {
|
||||
if (REQUIRE_REPEAT_KEYWORD_ON_MULTI_ALTER.contains(family)) {
|
||||
String separator = "";
|
||||
|
||||
for (Field<?> dropColumn : dropColumns) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user