01: package liquibase.database.sql;
02:
03: import liquibase.database.Database;
04: import liquibase.exception.StatementNotSupportedOnDatabaseException;
05:
06: public class DropViewStatement implements SqlStatement {
07:
08: private String schemaName;
09: private String viewName;
10:
11: public DropViewStatement(String schemaName, String viewName) {
12: this .schemaName = schemaName;
13: this .viewName = viewName;
14: }
15:
16: public String getSchemaName() {
17: return schemaName;
18: }
19:
20: public String getViewName() {
21: return viewName;
22: }
23:
24: public String getSqlStatement(Database database)
25: throws StatementNotSupportedOnDatabaseException {
26: return "DROP VIEW "
27: + database.escapeViewName(getSchemaName(),
28: getViewName());
29: }
30:
31: public String getEndDelimiter(Database database) {
32: return ";";
33: }
34:
35: public boolean supportsDatabase(Database database) {
36: return true;
37: }
38: }
|