Mohit,

2014-04-12 22:23 GMT+02:00 Mohit Jaggi <[email protected]>:

>
>>
>> Already today, you can implement your own jOOQ-Meta Database that
>> supplies schemas, tables, columns, etc. to the code generator. This custom
>> Database could read any sort of XML file, e.g. an external one by Flywaydb
>> or Hibernate.
>>
>> How you generate that external file would then be entirely up to you.
>>
>>
>> Lukas,
> I did not understand. Could you please point me to an example or section
> of jooq documentation please?
>

Unfortunately, we don't have any documentation in that area yet. But the
idea is quite easy to understand. jOOQ-Meta has a variety of "Database"
implementations, which deliver database meta information to jOOQ-Codegen.
In your code generation configuration file, you can see the "Database" here:

<generator>
    <database>
      <!-- The database dialect from jooq-meta. Available dialects are
           named org.util.[database].[database]Database. Known values are: [...]

           You can also provide your own org.jooq.util.Database implementation
           here, if your database is currently not supported or if you wish to
           read the database schema from a file, such as a Hibernate
.hbm.xml file -->
      <name>org.jooq.util.oracle.OracleDatabase</name>


See:
http://www.jooq.org/doc/latest/manual/code-generation/codegen-configuration

Currently, all of these implementations read their meta information from an
actual database connection. There is, however, no stopping you from
implementing your own "Database" implementation (just about 8 methods),
which provides meta information from your own XML / CSV / JSON file, etc.

Within less than a day, you *could* pull this information from a file,
rather than from a running database.

I'll comment on Witold's excellent explanation in another message.

-- 
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.

Reply via email to