jpegasus jpegasus - 1 month ago 5x
Java Question

Exclude a particular schema from code generation in JOOQ

I've currently trying to generate classes based on my existing Postgres DB using JOOQ. In my JOOQ .xml config I have left out any inputSchema tags so that JOOQ generates all the schemas it finds:


However, I would like to exclude the information schema from the content that gets generated. Is there a way to do this in black list way? Or do I have to add input schemas for all the schemas except information schema?


You can use the <excludes> configuration as documented here:

  (?i:information_schema\..*) # I'm using (?i: ... ) for case-insensitivity here...

Both <includes> and <excludes> take Java regular expressions as arguments, which make matching unwanted schemas relatively easy.