Search in sources :

Example 1 with AlterIndexFinalStep

use of org.jooq.AlterIndexFinalStep in project jOOQ by jOOQ.

the class ParserImpl method parseAlterIndex.

private static final DDLQuery parseAlterIndex(ParserContext ctx) {
    boolean ifExists = parseKeywordIf(ctx, "IF EXISTS");
    Name indexName = parseIndexName(ctx);
    parseKeyword(ctx, "RENAME TO");
    Name newName = parseIndexName(ctx);
    AlterIndexStep s1 = ifExists ? ctx.dsl.alterIndexIfExists(indexName) : ctx.dsl.alterIndex(indexName);
    AlterIndexFinalStep s2 = s1.renameTo(newName);
    return s2;
}
Also used : AlterIndexFinalStep(org.jooq.AlterIndexFinalStep) AlterIndexStep(org.jooq.AlterIndexStep) Name(org.jooq.Name)

Aggregations

AlterIndexFinalStep (org.jooq.AlterIndexFinalStep)1 AlterIndexStep (org.jooq.AlterIndexStep)1 Name (org.jooq.Name)1