use of org.jooq.AlterSchemaFinalStep in project jOOQ by jOOQ.
the class ParserImpl method parseAlterSchema.
private static final DDLQuery parseAlterSchema(ParserContext ctx) {
boolean ifExists = parseKeywordIf(ctx, "IF EXISTS");
Schema schemaName = parseSchemaName(ctx);
parseKeyword(ctx, "RENAME TO");
Schema newName = parseSchemaName(ctx);
AlterSchemaStep s1 = ifExists ? ctx.dsl.alterSchemaIfExists(schemaName) : ctx.dsl.alterSchema(schemaName);
AlterSchemaFinalStep s2 = s1.renameTo(newName);
return s2;
}
Aggregations