Is there any way to cache the metadata extracted from a database (sqlserver) for repeated codegen runs?

18 views
Skip to first unread message

Daniel Einspanjer

unread,
Dec 23, 2016, 7:51:05 AM12/23/16
to jOOQ User Group
While I'm working on configuring this generator the way I want, I am running the codegen tool dozens of times.  Each time, there is a lengthy delay while it makes the connection to the remote database, scans through the many databases found in the MS SQL Server instance, ignores all but one of then, then scans through the thousands of objects in the one catalog I am filtering for and generates the hundred odd objects with which I am working.

It would be *much* easier to do this development if I could tell jooq to cache the raw metadata or feed it an exported form of the catalog.  I saw that jooq supports an XMLDatabase import, but I could not find a way to export the schema from MS SQL Server Management Studio in XML format.

Are there any options that would help me out here?

-Daniel

Lukas Eder

unread,
Dec 23, 2016, 7:59:43 AM12/23/16
to jooq...@googlegroups.com
Hi Daniel,

There's good news:

1. You can use jOOQ's XMLDatabase [1] to import jOOQ's XML meta data format [2] instead of connecting to a database. It should be easy to transform Microsoft's XML format to jOOQ's using XSLT. The drawback of this approach is that you lose some information, e.g. stored procedures are currently not supported in this way.
2. In the upcoming jOOQ 3.9 (released today in 1-2 hours), you'll be able to also export that XML format using the new XMLGenerator [3]

Hope this helps,
Let me know if you need any additional information,
Lukas


--
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 jooq-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages