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; }
private AlterView parseAlterView() throws SQLException { AlterView command = new AlterView(session); String viewName = readIdentifierWithSchema(); Table tableView = getSchema().findTableOrView(session, viewName); if (!(tableView instanceof TableView)) { throw Message.getSQLException(ErrorCode.VIEW_NOT_FOUND_1, viewName); } TableView view = (TableView) tableView; command.setView(view); read("RECOMPILE"); return command; }
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; }
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; }