Search in sources :

Example 1 with DropIndexFinalStep

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

the class ParserImpl method parseDropIndex.

private static final DDLQuery parseDropIndex(ParserContext ctx) {
    boolean ifExists = parseKeywordIf(ctx, "IF EXISTS");
    Name indexName = parseIndexName(ctx);
    boolean on = parseKeywordIf(ctx, "ON");
    Table<?> onTable = on ? parseTableName(ctx) : null;
    DropIndexOnStep s1;
    DropIndexFinalStep s2;
    s1 = ifExists ? ctx.dsl.dropIndexIfExists(indexName) : ctx.dsl.dropIndex(indexName);
    s2 = on ? s1.on(onTable) : s1;
    return s2;
}
Also used : DropIndexOnStep(org.jooq.DropIndexOnStep) DropIndexFinalStep(org.jooq.DropIndexFinalStep) Name(org.jooq.Name)

Aggregations

DropIndexFinalStep (org.jooq.DropIndexFinalStep)1 DropIndexOnStep (org.jooq.DropIndexOnStep)1 Name (org.jooq.Name)1