Search in sources :

Example 1 with AlterIndexRename

use of org.h2.command.ddl.AlterIndexRename in project h2database by h2database.

the class Parser method parseAlterIndex.

private AlterIndexRename parseAlterIndex() {
    boolean ifExists = readIfExists(false);
    String indexName = readIdentifierWithSchema();
    Schema old = getSchema();
    AlterIndexRename command = new AlterIndexRename(session);
    command.setOldSchema(old);
    command.setOldName(indexName);
    command.setIfExists(ifExists);
    read("RENAME");
    read("TO");
    String newName = readIdentifierWithSchema(old.getName());
    checkSchema(old);
    command.setNewName(newName);
    return command;
}
Also used : AlterIndexRename(org.h2.command.ddl.AlterIndexRename) DropSchema(org.h2.command.ddl.DropSchema) CreateSchema(org.h2.command.ddl.CreateSchema) Schema(org.h2.schema.Schema) ValueString(org.h2.value.ValueString)

Aggregations

AlterIndexRename (org.h2.command.ddl.AlterIndexRename)1 CreateSchema (org.h2.command.ddl.CreateSchema)1 DropSchema (org.h2.command.ddl.DropSchema)1 Schema (org.h2.schema.Schema)1 ValueString (org.h2.value.ValueString)1