use of org.h2.command.ddl.AlterView in project h2database by h2database.
the class Parser method parseAlterView.
private AlterView parseAlterView() {
AlterView command = new AlterView(session);
boolean ifExists = readIfExists(false);
command.setIfExists(ifExists);
String viewName = readIdentifierWithSchema();
Table tableView = getSchema().findTableOrView(session, viewName);
if (!(tableView instanceof TableView) && !ifExists) {
throw DbException.get(ErrorCode.VIEW_NOT_FOUND_1, viewName);
}
TableView view = (TableView) tableView;
command.setView(view);
read("RECOMPILE");
return command;
}
Aggregations