Available in versions: Dev (3.20) | Latest (3.19) | 3.18 | 3.17 | 3.16 | 3.15 | 3.14 | 3.13 | 3.12

Interpreted meta data

Applies to ✅ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

jOOQ's parser is used by a DDL interpreter to create an alternative implementation of org.jooq.Meta based on your DDL scripts:

// Using strings:
create.meta(
         Source.of("create table a (i int);"),
         Source.of("create table b (j int);"),
         Source.of("create table c (k int);")
       )
      .getTables()
      .forEach(System.out::println);

The above prints all of the tables from the DDL scripts

a
b
c

All the meta data is available, including column names, types, constraints, etc.

DDL can be interpreted from org.jooq.Source, which represents any string providing source, including files, input streams, etc.

Exporting DDL

Any org.jooq.Meta implementation can be exported back to DDL statements (translated to any dialect!) using Meta.ddl()

Feedback

Do you have any feedback about this page? We'd love to hear it!

The jOOQ Logo