Hello Sujee, Thanks for your enquiry. The main reason why jOOQ supports DDL statements is the fact that developers may want to quickly reproduce a simplified version of their schema on a test database like H2, for instance. The workflow would be :
- Write DDL for Oracle - Generate jOOQ classes from your DDL - Generate DDL for H2 and execute it - Run integration tests using jOOQ classes on H2 instead of Oracle We cannot go beyond the above, because each vendor has a very rich set of syntax extensions to the SQL standard, involving storage clauses, hints, flags, etc. While we could add support for the keywords you've mentioned (DISTKEY, SORTKEY, DISTSTYLE), you would be quickly missing other keywords later on, again. This is why we generally suggest using something like Flyway for database migrations and DDL management. Since Flyway is a SQL template based API, it will not suffer from these limitations. More information can be found here: http://www.jooq.org/doc/latest/manual/sql-building/ddl-statements I hope this helps, Lukas 2015-05-20 16:53 GMT+02:00 Sujeevan Nagarajah <[email protected]>: > Hello, > I am using jOOQ 3.7.0-SNAPSHOT to generate Redshift CREATE TABLE > statement. I'm able to successfully generate simple table statement. > Currently I'm looking for a way to add Redshift specific keywords like > DISTKEY, SORTKEY, DISTSTYLE, ..etc ( > http://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_TABLE_NEW.html). > But I couldn't find any methods related to them. Can someone advice me on > how to specify them? > > My code currently looks something like below, > > DSL.using(SQLDialect.REDSHIFT).createTable(name("schemaName", > "tableName")).column("sales", RedshiftDataType.DECIMAL.precision(19, > 3)).column("product", RedshiftDataType.VARCHAR).toString(); > > Thank you. > > Best Regards, > Sujee > > -- > You received this message because you are subscribed to the Google Groups > "jOOQ User Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
