use of org.jooq.DropSchemaStep in project jOOQ by jOOQ.
the class ParserImpl method parseDropSchema.
private static final DDLQuery parseDropSchema(ParserContext ctx) {
boolean ifExists = parseKeywordIf(ctx, "IF EXISTS");
Schema schemaName = parseSchemaName(ctx);
boolean cascade = parseKeywordIf(ctx, "CASCADE");
boolean restrict = !cascade && parseKeywordIf(ctx, "RESTRICT");
DropSchemaStep s1;
DropSchemaFinalStep s2;
s1 = ifExists ? ctx.dsl.dropSchemaIfExists(schemaName) : ctx.dsl.dropSchema(schemaName);
s2 = cascade ? s1.cascade() : restrict ? s1.restrict() : s1;
return s2;
}
Aggregations