use of org.jooq.DropTableFinalStep in project jOOQ by jOOQ.
the class ParserImpl method parseDropTable.
private static final DDLQuery parseDropTable(ParserContext ctx) {
boolean ifExists = parseKeywordIf(ctx, "IF EXISTS");
Table<?> tableName = parseTableName(ctx);
boolean cascade = parseKeywordIf(ctx, "CASCADE");
boolean restrict = !cascade && parseKeywordIf(ctx, "RESTRICT");
DropTableStep s1;
DropTableFinalStep s2;
s1 = ifExists ? ctx.dsl.dropTableIfExists(tableName) : ctx.dsl.dropTable(tableName);
s2 = cascade ? s1.cascade() : restrict ? s1.restrict() : s1;
return s2;
}
Aggregations