Search in sources :

Example 1 with AlterView

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;
}
Also used : AlterView(org.h2.command.ddl.AlterView) RangeTable(org.h2.table.RangeTable) TruncateTable(org.h2.command.ddl.TruncateTable) CreateTable(org.h2.command.ddl.CreateTable) FunctionTable(org.h2.table.FunctionTable) CreateLinkedTable(org.h2.command.ddl.CreateLinkedTable) Table(org.h2.table.Table) DropTable(org.h2.command.ddl.DropTable) ValueString(org.h2.value.ValueString) TableView(org.h2.table.TableView)

Aggregations

AlterView (org.h2.command.ddl.AlterView)1 CreateLinkedTable (org.h2.command.ddl.CreateLinkedTable)1 CreateTable (org.h2.command.ddl.CreateTable)1 DropTable (org.h2.command.ddl.DropTable)1 TruncateTable (org.h2.command.ddl.TruncateTable)1 FunctionTable (org.h2.table.FunctionTable)1 RangeTable (org.h2.table.RangeTable)1 Table (org.h2.table.Table)1 TableView (org.h2.table.TableView)1 ValueString (org.h2.value.ValueString)1