[jOOQ/jOOQ#9244] Add support for DROP TEMPORARY TABLE IF EXISTS

This commit is contained in:
Lukas Eder 2019-09-19 14:12:17 +02:00
parent 2149fef761
commit df81c9cd04
3 changed files with 69 additions and 0 deletions

View File

@ -9693,6 +9693,30 @@ public interface DSLContext extends Scope , AutoCloseable {
@Support({ MARIADB, MYSQL, POSTGRES })
DropTableStep dropTemporaryTable(Table<?> table);
/**
* Create a new DSL <code>DROP TEMPORARY TABLE IF EXISTS</code> statement.
*
* @see DSL#dropTemporaryTableIfExists(String)
*/
@Support({ MARIADB, MYSQL, POSTGRES })
DropTableStep dropTemporaryTableIfExists(String table);
/**
* Create a new DSL <code>DROP TEMPORARY TABLE IF EXISTS</code> statement.
*
* @see DSL#dropTemporaryTableIfExists(Name)
*/
@Support({ MARIADB, MYSQL, POSTGRES })
DropTableStep dropTemporaryTableIfExists(Name table);
/**
* Create a new DSL <code>DROP TEMPORARY TABLE IF EXISTS</code> statement.
*
* @see DSL#dropTemporaryTableIfExists(Table)
*/
@Support({ MARIADB, MYSQL, POSTGRES })
DropTableStep dropTemporaryTableIfExists(Table<?> table);
/**
* Create a new DSL <code>DROP INDEX</code> statement.
*

View File

@ -7781,6 +7781,36 @@ public class DSL {
return dsl().dropTemporaryTable(table);
}
/**
* Create a new DSL <code>DROP TEMPORARY TABLE IF EXISTS</code> statement.
*
* @see DSLContext#dropTemporaryTableIfExists(String)
*/
@Support({ MARIADB, MYSQL, POSTGRES })
public static DropTableStep dropTemporaryTableIfExists(String table) {
return dsl().dropTemporaryTableIfExists(table);
}
/**
* Create a new DSL <code>DROP TEMPORARY TABLE IF EXISTS</code> statement.
*
* @see DSLContext#dropTemporaryTableIfExists(Name)
*/
@Support({ MARIADB, MYSQL, POSTGRES })
public static DropTableStep dropTemporaryTableIfExists(Name table) {
return dsl().dropTemporaryTableIfExists(table);
}
/**
* Create a new DSL <code>DROP TEMPORARY TABLE IF EXISTS</code> statement.
*
* @see DSLContext#dropTemporaryTableIfExists(Table)
*/
@Support({ MARIADB, MYSQL, POSTGRES })
public static DropTableStep dropTemporaryTableIfExists(Table<?> table) {
return dsl().dropTemporaryTableIfExists(table);
}
/**
* Create a new DSL <code>DROP TABLE IF EXISTS</code> statement.
* <p>

View File

@ -3541,6 +3541,21 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
return new DropTableImpl(configuration(), table, false, true);
}
@Override
public DropTableStep dropTemporaryTableIfExists(String table) {
return dropTemporaryTableIfExists(name(table));
}
@Override
public DropTableStep dropTemporaryTableIfExists(Name table) {
return dropTemporaryTableIfExists(table(table));
}
@Override
public DropTableStep dropTemporaryTableIfExists(Table<?> table) {
return new DropTableImpl(configuration(), table, true, true);
}
@Override
public DropTableStep dropTableIfExists(String table) {
return dropTableIfExists(name(table));