[jOOQ/jOOQ#10210] Re-generate DropDatabaseImpl
This commit is contained in:
parent
fe43228433
commit
387d6c5b16
@ -8932,6 +8932,54 @@ public interface DSLContext extends Scope , AutoCloseable {
|
||||
@Support({ POSTGRES })
|
||||
<T> AlterDomainStep<T> alterDomainIfExists(Domain<T> domain);
|
||||
|
||||
/**
|
||||
* The <code>DROP DATABASE</code> statement.
|
||||
*
|
||||
* @see DSL#dropDatabase(String)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
DropDatabaseFinalStep dropDatabase(String database);
|
||||
|
||||
/**
|
||||
* The <code>DROP DATABASE</code> statement.
|
||||
*
|
||||
* @see DSL#dropDatabase(Name)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
DropDatabaseFinalStep dropDatabase(Name database);
|
||||
|
||||
/**
|
||||
* The <code>DROP DATABASE</code> statement.
|
||||
*
|
||||
* @see DSL#dropDatabase(Catalog)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
DropDatabaseFinalStep dropDatabase(Catalog database);
|
||||
|
||||
/**
|
||||
* The <code>DROP DATABASE IF EXISTS</code> statement.
|
||||
*
|
||||
* @see DSL#dropDatabaseIfExists(String)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
DropDatabaseFinalStep dropDatabaseIfExists(String database);
|
||||
|
||||
/**
|
||||
* The <code>DROP DATABASE IF EXISTS</code> statement.
|
||||
*
|
||||
* @see DSL#dropDatabaseIfExists(Name)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
DropDatabaseFinalStep dropDatabaseIfExists(Name database);
|
||||
|
||||
/**
|
||||
* The <code>DROP DATABASE IF EXISTS</code> statement.
|
||||
*
|
||||
* @see DSL#dropDatabaseIfExists(Catalog)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
DropDatabaseFinalStep dropDatabaseIfExists(Catalog database);
|
||||
|
||||
/**
|
||||
* The <code>DROP DOMAIN</code> statement.
|
||||
*
|
||||
@ -10134,54 +10182,6 @@ public interface DSLContext extends Scope , AutoCloseable {
|
||||
@Support({ H2, POSTGRES })
|
||||
AlterIndexStep alterIndexIfExists(Index index);
|
||||
|
||||
/**
|
||||
* Create a new DSL <code>DROP DATABASE</code> statement.
|
||||
*
|
||||
* @see DSL#dropDatabase(String)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
DropDatabaseFinalStep dropDatabase(String database);
|
||||
|
||||
/**
|
||||
* Create a new DSL <code>DROP DATABASE</code> statement.
|
||||
*
|
||||
* @see DSL#dropDatabase(Name)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
DropDatabaseFinalStep dropDatabase(Name database);
|
||||
|
||||
/**
|
||||
* Create a new DSL <code>DROP DATABASE</code> statement.
|
||||
*
|
||||
* @see DSL#dropDatabase(Catalog)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
DropDatabaseFinalStep dropDatabase(Catalog database);
|
||||
|
||||
/**
|
||||
* Create a new DSL <code>DROP DATABASE</code> statement.
|
||||
*
|
||||
* @see DSL#dropDatabaseIfExists(String)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
DropDatabaseFinalStep dropDatabaseIfExists(String database);
|
||||
|
||||
/**
|
||||
* Create a new DSL <code>DROP DATABASE</code> statement.
|
||||
*
|
||||
* @see DSL#dropDatabaseIfExists(Name)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
DropDatabaseFinalStep dropDatabaseIfExists(Name database);
|
||||
|
||||
/**
|
||||
* Create a new DSL <code>DROP DATABASE</code> statement.
|
||||
*
|
||||
* @see DSL#dropDatabaseIfExists(Catalog)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
DropDatabaseFinalStep dropDatabaseIfExists(Catalog database);
|
||||
|
||||
/**
|
||||
* Create a new DSL <code>DROP SCHEMA</code> statement.
|
||||
*
|
||||
|
||||
@ -37,8 +37,12 @@
|
||||
*/
|
||||
package org.jooq;
|
||||
|
||||
import static org.jooq.SQLDialect.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* The final step in the <code>DROP SCHEMA</code> DSL.
|
||||
* A step in the construction of the DROP DATABASE statement.
|
||||
* <p>
|
||||
* <h3>Referencing <code>XYZ*Step</code> types directly from client code</h3>
|
||||
* <p>
|
||||
@ -57,9 +61,7 @@ package org.jooq;
|
||||
* <li>They're less readable</li>
|
||||
* <li>They might have binary incompatible changes between minor releases</li>
|
||||
* </ul>
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
@SuppressWarnings({ "unused" })
|
||||
public interface DropDatabaseFinalStep extends DDLQuery {
|
||||
|
||||
}
|
||||
|
||||
@ -198,7 +198,6 @@ import org.jooq.Delete;
|
||||
import org.jooq.DeleteUsingStep;
|
||||
import org.jooq.DerivedColumnList;
|
||||
import org.jooq.Domain;
|
||||
import org.jooq.DropDatabaseFinalStep;
|
||||
import org.jooq.DropIndexOnStep;
|
||||
import org.jooq.DropSchemaStep;
|
||||
import org.jooq.DropSequenceFinalStep;
|
||||
@ -7063,6 +7062,66 @@ public class DSL {
|
||||
return dsl().alterDomainIfExists(domain);
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>DROP DATABASE</code> statement.
|
||||
*
|
||||
* @see DSLContext#dropDatabase(String)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
public static org.jooq.DropDatabaseFinalStep dropDatabase(String database) {
|
||||
return dsl().dropDatabase(database);
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>DROP DATABASE</code> statement.
|
||||
*
|
||||
* @see DSLContext#dropDatabase(Name)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
public static org.jooq.DropDatabaseFinalStep dropDatabase(Name database) {
|
||||
return dsl().dropDatabase(database);
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>DROP DATABASE</code> statement.
|
||||
*
|
||||
* @see DSLContext#dropDatabase(Catalog)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
public static org.jooq.DropDatabaseFinalStep dropDatabase(Catalog database) {
|
||||
return dsl().dropDatabase(database);
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>DROP DATABASE IF EXISTS</code> statement.
|
||||
*
|
||||
* @see DSLContext#dropDatabaseIfExists(String)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
public static org.jooq.DropDatabaseFinalStep dropDatabaseIfExists(String database) {
|
||||
return dsl().dropDatabaseIfExists(database);
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>DROP DATABASE IF EXISTS</code> statement.
|
||||
*
|
||||
* @see DSLContext#dropDatabaseIfExists(Name)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
public static org.jooq.DropDatabaseFinalStep dropDatabaseIfExists(Name database) {
|
||||
return dsl().dropDatabaseIfExists(database);
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>DROP DATABASE IF EXISTS</code> statement.
|
||||
*
|
||||
* @see DSLContext#dropDatabaseIfExists(Catalog)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
public static org.jooq.DropDatabaseFinalStep dropDatabaseIfExists(Catalog database) {
|
||||
return dsl().dropDatabaseIfExists(database);
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>DROP DOMAIN</code> statement.
|
||||
*
|
||||
@ -8251,66 +8310,6 @@ public class DSL {
|
||||
return dsl().alterIndexIfExists(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new DSL <code>DROP DATABASE</code> statement.
|
||||
*
|
||||
* @see DSLContext#dropDatabase(String)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
public static DropDatabaseFinalStep dropDatabase(String database) {
|
||||
return dsl().dropDatabase(database);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new DSL <code>DROP DATABASE</code> statement.
|
||||
*
|
||||
* @see DSLContext#dropDatabase(Name)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
public static DropDatabaseFinalStep dropDatabase(Name database) {
|
||||
return dsl().dropDatabase(database);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new DSL <code>DROP DATABASE</code> statement.
|
||||
*
|
||||
* @see DSLContext#dropDatabase(Catalog)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
public static DropDatabaseFinalStep dropDatabase(Catalog database) {
|
||||
return dsl().dropDatabase(database);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new DSL <code>DROP DATABASE</code> statement.
|
||||
*
|
||||
* @see DSLContext#dropDatabaseIfExists(String)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
public static DropDatabaseFinalStep dropDatabaseIfExists(String database) {
|
||||
return dsl().dropDatabaseIfExists(database);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new DSL <code>DROP DATABASE</code> statement.
|
||||
*
|
||||
* @see DSLContext#dropDatabaseIfExists(Name)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
public static DropDatabaseFinalStep dropDatabaseIfExists(Name database) {
|
||||
return dsl().dropDatabaseIfExists(database);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new DSL <code>DROP DATABASE</code> statement.
|
||||
*
|
||||
* @see DSLContext#dropDatabaseIfExists(Catalog)
|
||||
*/
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
public static DropDatabaseFinalStep dropDatabaseIfExists(Catalog database) {
|
||||
return dsl().dropDatabaseIfExists(database);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new DSL <code>DROP SCHEMA</code> statement.
|
||||
*
|
||||
|
||||
@ -128,7 +128,6 @@ import org.jooq.DataType;
|
||||
import org.jooq.DeleteQuery;
|
||||
import org.jooq.DeleteUsingStep;
|
||||
import org.jooq.Domain;
|
||||
import org.jooq.DropDatabaseFinalStep;
|
||||
import org.jooq.DropIndexOnStep;
|
||||
import org.jooq.DropSchemaStep;
|
||||
import org.jooq.DropSequenceFinalStep;
|
||||
@ -3040,6 +3039,36 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
|
||||
return new AlterDomainImpl<>(configuration(), domain, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.jooq.DropDatabaseFinalStep dropDatabase(String database) {
|
||||
return new DropDatabaseImpl(configuration(), DSL.catalog(database), false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.jooq.DropDatabaseFinalStep dropDatabase(Name database) {
|
||||
return new DropDatabaseImpl(configuration(), DSL.catalog(database), false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.jooq.DropDatabaseFinalStep dropDatabase(Catalog database) {
|
||||
return new DropDatabaseImpl(configuration(), database, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.jooq.DropDatabaseFinalStep dropDatabaseIfExists(String database) {
|
||||
return new DropDatabaseImpl(configuration(), DSL.catalog(database), true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.jooq.DropDatabaseFinalStep dropDatabaseIfExists(Name database) {
|
||||
return new DropDatabaseImpl(configuration(), DSL.catalog(database), true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.jooq.DropDatabaseFinalStep dropDatabaseIfExists(Catalog database) {
|
||||
return new DropDatabaseImpl(configuration(), database, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.jooq.DropDomainCascadeStep dropDomain(String domain) {
|
||||
return new DropDomainImpl(configuration(), DSL.domain(domain), false);
|
||||
@ -3792,36 +3821,6 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
|
||||
return new AlterIndexImpl(configuration(), index, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DropDatabaseFinalStep dropDatabase(String database) {
|
||||
return dropDatabase(name(database));
|
||||
}
|
||||
|
||||
@Override
|
||||
public DropDatabaseFinalStep dropDatabase(Name database) {
|
||||
return dropDatabase(catalog(database));
|
||||
}
|
||||
|
||||
@Override
|
||||
public DropDatabaseFinalStep dropDatabase(Catalog database) {
|
||||
return new DropDatabaseImpl(configuration(), database);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DropDatabaseFinalStep dropDatabaseIfExists(String database) {
|
||||
return dropDatabaseIfExists(name(database));
|
||||
}
|
||||
|
||||
@Override
|
||||
public DropDatabaseFinalStep dropDatabaseIfExists(Name database) {
|
||||
return dropDatabaseIfExists(catalog(database));
|
||||
}
|
||||
|
||||
@Override
|
||||
public DropDatabaseFinalStep dropDatabaseIfExists(Catalog database) {
|
||||
return new DropDatabaseImpl(configuration(), database, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DropSchemaStep dropSchema(String schema) {
|
||||
return dropSchema(name(schema));
|
||||
|
||||
@ -37,7 +37,6 @@
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.Clause.DROP_SCHEMA;
|
||||
// ...
|
||||
// ...
|
||||
// ...
|
||||
@ -54,48 +53,50 @@ import static org.jooq.impl.Keywords.K_IF_EXISTS;
|
||||
import java.util.Set;
|
||||
|
||||
import org.jooq.Catalog;
|
||||
import org.jooq.Clause;
|
||||
import org.jooq.Configuration;
|
||||
import org.jooq.Context;
|
||||
import org.jooq.DropDatabaseFinalStep;
|
||||
import org.jooq.SQLDialect;
|
||||
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
* The <code>DROP DATABASE IF EXISTS</code> statement.
|
||||
*/
|
||||
final class DropDatabaseImpl extends AbstractRowCountQuery implements
|
||||
@SuppressWarnings({ "hiding", "rawtypes", "unchecked", "unused" })
|
||||
final class DropDatabaseImpl
|
||||
extends
|
||||
AbstractRowCountQuery
|
||||
implements
|
||||
DropDatabaseFinalStep
|
||||
{
|
||||
|
||||
// Cascading interface implementations for DROP DATABASE behaviour
|
||||
DropDatabaseFinalStep {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Generated UID
|
||||
*/
|
||||
private static final long serialVersionUID = 8904572826501186329L;
|
||||
private static final Clause[] CLAUSES = { DROP_SCHEMA };
|
||||
private static final Set<SQLDialect> NO_SUPPORT_IF_EXISTS = SQLDialect.supportedBy(DERBY, FIREBIRD);
|
||||
private final Catalog database;
|
||||
private final boolean ifExists;
|
||||
|
||||
private final Catalog database;
|
||||
private final boolean ifExists;
|
||||
|
||||
DropDatabaseImpl(Configuration configuration, Catalog database) {
|
||||
this(configuration, database, false);
|
||||
}
|
||||
|
||||
DropDatabaseImpl(Configuration configuration, Catalog database, boolean ifExists) {
|
||||
DropDatabaseImpl(
|
||||
Configuration configuration,
|
||||
Catalog database,
|
||||
boolean ifExists
|
||||
) {
|
||||
super(configuration);
|
||||
|
||||
this.database = database;
|
||||
this.ifExists = ifExists;
|
||||
}
|
||||
|
||||
final Catalog $database() { return database; }
|
||||
final boolean $ifExists() { return ifExists; }
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX DSL API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// XXX: QueryPart API
|
||||
// ------------------------------------------------------------------------
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX QueryPart API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
private static final Set<SQLDialect> NO_SUPPORT_IF_EXISTS = SQLDialect.supportedBy(DERBY, FIREBIRD);
|
||||
|
||||
private final boolean supportsIfExists(Context<?> ctx) {
|
||||
return !NO_SUPPORT_IF_EXISTS.contains(ctx.family());
|
||||
@ -121,4 +122,6 @@ final class DropDatabaseImpl extends AbstractRowCountQuery implements
|
||||
|
||||
ctx.sql(' ').visit(database);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user