Package com.exasol.sql.ddl.drop
Class DropTable
- java.lang.Object
-
- com.exasol.sql.AbstractFragment
-
- com.exasol.sql.ddl.drop.DropTable
-
- All Implemented Interfaces:
DropTableFragment
,Fragment
,SqlStatement
public class DropTable extends AbstractFragment implements SqlStatement, DropTableFragment
This class implements an SQLDropTable
statement.
-
-
Field Summary
-
Fields inherited from class com.exasol.sql.AbstractFragment
root
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(DropTableVisitor visitor)
Accept a visitor (e.g.DropTable
cascadeConstraints()
AddCASCADE CONSTRAINTS
clause into aDROP TABLE
statement.protected CascadeConstraints
getCascadeConstraints()
Get theCASCADE CONSTRAINTS
option.protected String
getTableName()
Get the table name.boolean
hasIfExistsModifier()
Check if theIF EXISTS
clause is present.DropTable
ifExists()
AddIF EXISTS
clause into aDROP TABLE
statement.-
Methods inherited from class com.exasol.sql.AbstractFragment
getRoot
-
-
-
-
Method Detail
-
ifExists
public DropTable ifExists()
AddIF EXISTS
clause into aDROP TABLE
statement.- Returns:
this
for fluent programming
-
cascadeConstraints
public DropTable cascadeConstraints()
AddCASCADE CONSTRAINTS
clause into aDROP TABLE
statement.- Returns:
this
for fluent programming
-
getTableName
protected String getTableName()
Get the table name.- Returns:
- table name
-
hasIfExistsModifier
public boolean hasIfExistsModifier()
Check if theIF EXISTS
clause is present.- Returns:
true
ifIF EXISTS
clause is present
-
getCascadeConstraints
protected CascadeConstraints getCascadeConstraints()
Get theCASCADE CONSTRAINTS
option.- Returns:
CASCADE CONSTRAINTS
option
-
accept
public void accept(DropTableVisitor visitor)
Description copied from interface:DropTableFragment
Accept a visitor (e.g. a renderer or validator)- Specified by:
accept
in interfaceDropTableFragment
- Parameters:
visitor
- visitor to accept
-
-