Are there any Java libraries that allow me to generate DDL from Java code using a typesafe builder pattern, or similar?
Something along the lines of:
String sql = DDLGenerator.createTable("MY_TABLE")
.withPrimaryKey("my_id").ofNumberType().withPrecision(2, 2)
.withColumn("name").ofVarchar2Type().withLength(30).notNull()
.withIndexOn("name")
.buildSql(Dialect.ORACLE);
I'm not looking for an ORM solution such as Hibernate nor a database migration solution such as Liquibase or Flyway, nor a tool that works with an existing schema.