use of org.jooq.AlterIndexStep 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;
}
use of org.jooq.AlterIndexStep in project jOOQ by jOOQ.
the class DefaultParseContext method parseAlterIndex.
private final DDLQuery parseAlterIndex() {
boolean ifExists = parseKeywordIf("IF EXISTS");
Name indexName = parseIndexName();
parseKeyword("RENAME");
parseKeyword("AS", "TO");
Name newName = parseIndexName();
AlterIndexStep s1 = ifExists ? dsl.alterIndexIfExists(indexName) : dsl.alterIndex(indexName);
return s1.renameTo(newName);
}
Aggregations