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 SQLDropSchema
statement.
-
-
Field Summary
-
Fields inherited from class com.exasol.sql.AbstractFragment
root
-
-
Constructor Summary
Constructors Constructor Description DropSchema(String schemaName)
Create a new instance of anDropSchema
statement.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(DropSchemaVisitor visitor)
Accept a visitor (e.g.void
cascade()
AddCASCADE
clause to aDROP SCHEMA
statement.Cascade
getCascade()
Get the cascade.Restrict
getRestrict()
Get the restriction.String
getSchemaName()
Get the schema name.boolean
hasIfExistsModifier()
Check whether theIF EXISTS
clause is present.DropSchema
ifExists()
AddIF EXISTS
clause into aDROP SCHEMA
statement.void
restrict()
AddRESTRICT
clause to aDROP SCHEMA
statement.-
Methods inherited from class com.exasol.sql.AbstractFragment
getRoot
-
-
-
-
Constructor Detail
-
DropSchema
public DropSchema(String schemaName)
Create a new instance of anDropSchema
statement.- Parameters:
schemaName
- name of the table to drop
-
-
Method Detail
-
ifExists
public DropSchema ifExists()
AddIF EXISTS
clause into aDROP SCHEMA
statement.- Returns:
this
for fluent programming
-
cascade
public void cascade()
AddCASCADE
clause to aDROP SCHEMA
statement.
-
restrict
public void restrict()
AddRESTRICT
clause to aDROP SCHEMA
statement.
-
getSchemaName
public String getSchemaName()
Get the schema name.- Returns:
- schema name
-
hasIfExistsModifier
public boolean hasIfExistsModifier()
Check whether theIF EXISTS
clause is present.- Returns:
true
ifIF EXISTS
clause is present
-
accept
public void accept(DropSchemaVisitor visitor)
Description copied from interface:DropSchemaFragment
Accept a visitor (e.g. a renderer or validator)- Specified by:
accept
in interfaceDropSchemaFragment
- Parameters:
visitor
- visitor to accept
-
-