private static final DDLQuery parseDropTable(ParserContext ctx, boolean temporary) { 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) : temporary ? ctx.dsl.dropTemporaryTable(tableName) : ctx.dsl.dropTable(tableName); s2 = cascade ? s1.cascade() : restrict ? s1.restrict() : s1; return s2; }