public class DropTable extends H2SqlPart
Generates a DROP TABLE statement for H2.
DROP TABLE IF EXISTS person, address CASCADE
| Constructor and Description |
|---|
DropTable() |
DropTable(String... tableNames)
Constructs a DropTable with the specified table names.
|
| Modifier and Type | Method and Description |
|---|---|
void |
collectSqlFragment(CodeWriter writer) |
List<String> |
getTableNames()
Returns the table names.
|
boolean |
isCascade()
Returns whether CASCADE is enabled.
|
boolean |
isCheckIfExists()
Indicates if
IF EXISTS clause should be included in the DROP TABLE statement (default true). |
boolean |
isRestrict()
Returns whether RESTRICT is enabled.
|
DropTable |
setCascade(boolean cascade)
Sets whether CASCADE is enabled.
|
DropTable |
setCheckIfExists(boolean checkIfExists)
Sets whether IF EXISTS clause should be included in the DROP TABLE statement.
|
DropTable |
setPretty(boolean pretty) |
DropTable |
setTableNames(Collection<String> tableNames)
Sets the table names from a collection.
|
DropTable |
setTableNames(String... tableNames)
Sets the table names.
|
escapeKeyword, placeBackTickscollectParameterValues, getParameterValues, getSqlFragment, isPretty, printSqlParts, toStringpublic DropTable()
public DropTable(String... tableNames)
tableNames - the table names to droppublic void collectSqlFragment(CodeWriter writer)
collectSqlFragment in class SqlPartpublic DropTable setTableNames(Collection<String> tableNames)
tableNames - the table namespublic DropTable setTableNames(String... tableNames)
tableNames - the table namespublic boolean isCheckIfExists()
IF EXISTS clause should be included in the DROP TABLE statement (default true).public DropTable setCheckIfExists(boolean checkIfExists)
checkIfExists - true to include IF EXISTS clausepublic boolean isCascade()
public DropTable setCascade(boolean cascade)
cascade - true to enable CASCADEpublic boolean isRestrict()
Copyright (c) 2006-2026 North Concepts Inc. All Rights Reserved.