Package com.exasol.sql.ddl.drop
Class DropSchema
- java.lang.Object
-
- com.exasol.sql.AbstractFragment
-
- com.exasol.sql.ddl.drop.DropSchema
-
- All Implemented Interfaces:
DropSchemaFragment,Fragment,SqlStatement
public class DropSchema extends AbstractFragment implements SqlStatement, DropSchemaFragment
This class implements an SQLDropSchemastatement.
-
-
Field Summary
-
Fields inherited from class com.exasol.sql.AbstractFragment
root
-
-
Constructor Summary
Constructors Constructor Description DropSchema(String schemaName)Create a new instance of anDropSchemastatement.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(DropSchemaVisitor visitor)Accept a visitor (e.g.voidcascade()AddCASCADEclause to aDROP SCHEMAstatement.CascadegetCascade()Get the cascade.RestrictgetRestrict()Get the restriction.StringgetSchemaName()Get the schema name.booleanhasIfExistsModifier()Check whether theIF EXISTSclause is present.DropSchemaifExists()AddIF EXISTSclause into aDROP SCHEMAstatement.voidrestrict()AddRESTRICTclause to aDROP SCHEMAstatement.-
Methods inherited from class com.exasol.sql.AbstractFragment
getRoot
-
-
-
-
Constructor Detail
-
DropSchema
public DropSchema(String schemaName)
Create a new instance of anDropSchemastatement.- Parameters:
schemaName- name of the table to drop
-
-
Method Detail
-
ifExists
public DropSchema ifExists()
AddIF EXISTSclause into aDROP SCHEMAstatement.- Returns:
thisfor fluent programming
-
cascade
public void cascade()
AddCASCADEclause to aDROP SCHEMAstatement.
-
restrict
public void restrict()
AddRESTRICTclause to aDROP SCHEMAstatement.
-
getSchemaName
public String getSchemaName()
Get the schema name.- Returns:
- schema name
-
hasIfExistsModifier
public boolean hasIfExistsModifier()
Check whether theIF EXISTSclause is present.- Returns:
trueifIF EXISTSclause is present
-
accept
public void accept(DropSchemaVisitor visitor)
Description copied from interface:DropSchemaFragmentAccept a visitor (e.g. a renderer or validator)- Specified by:
acceptin interfaceDropSchemaFragment- Parameters:
visitor- visitor to accept
-
-