use of org.jooq.DropIndexCascadeStep in project jOOQ by jOOQ.
the class DefaultParseContext method parseDropIndex.
private final DDLQuery parseDropIndex() {
boolean ifExists = parseKeywordIf("IF EXISTS");
Name indexName = parseIndexName();
ifExists = ifExists || parseKeywordIf("IF EXISTS");
boolean on = parseKeywordIf("ON");
Table<?> onTable = on ? parseTableName() : null;
DropIndexOnStep s1;
DropIndexCascadeStep s2;
s1 = ifExists ? dsl.dropIndexIfExists(indexName) : dsl.dropIndex(indexName);
s2 = on ? s1.on(onTable) : s1;
return parseKeywordIf("CASCADE") ? s2.cascade() : parseKeywordIf("RESTRICT") ? s2.restrict() : s2;
}
Aggregations