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 SQLDropTablestatement.
-
-
Field Summary
-
Fields inherited from class com.exasol.sql.AbstractFragment
root
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(DropTableVisitor visitor)Accept a visitor (e.g.DropTablecascadeConstraints()AddCASCADE CONSTRAINTSclause into aDROP TABLEstatement.protected CascadeConstraintsgetCascadeConstraints()Get theCASCADE CONSTRAINTSoption.protected StringgetTableName()Get the table name.booleanhasIfExistsModifier()Check if theIF EXISTSclause is present.DropTableifExists()AddIF EXISTSclause into aDROP TABLEstatement.-
Methods inherited from class com.exasol.sql.AbstractFragment
getRoot
-
-
-
-
Method Detail
-
ifExists
public DropTable ifExists()
AddIF EXISTSclause into aDROP TABLEstatement.- Returns:
thisfor fluent programming
-
cascadeConstraints
public DropTable cascadeConstraints()
AddCASCADE CONSTRAINTSclause into aDROP TABLEstatement.- Returns:
thisfor fluent programming
-
getTableName
protected String getTableName()
Get the table name.- Returns:
- table name
-
hasIfExistsModifier
public boolean hasIfExistsModifier()
Check if theIF EXISTSclause is present.- Returns:
trueifIF EXISTSclause is present
-
getCascadeConstraints
protected CascadeConstraints getCascadeConstraints()
Get theCASCADE CONSTRAINTSoption.- Returns:
CASCADE CONSTRAINTSoption
-
accept
public void accept(DropTableVisitor visitor)
Description copied from interface:DropTableFragmentAccept a visitor (e.g. a renderer or validator)- Specified by:
acceptin interfaceDropTableFragment- Parameters:
visitor- visitor to accept
-
-