Yes you can. The code generator produces a set of internal API calls, which
you can produce yourself as well if you want. We generally recommend not to
use this internal API, as it is subject to change between minor releases.

There's a public API that is similar to the one generated by the code
generator for use-cases like yours:
https://www.jooq.org/doc/latest/manual/sql-building/queryparts/custom-queryparts

As far as DDL generation is concerned, it doesn't matter what
org.jooq.Schema, org.jooq.Table, org.jooq.Field, org.jooq.DataType, etc.
implementations it will receive. DSLContext.ddl() should be able to produce
DDL on any implementation.

I'll be very happy to help you with specific questions that you may have if
you run into any issues.

2017-06-09 12:06 GMT+02:00 <[email protected]>:

> For example can I create Java record like this manually:
>
> https://www.jooq.org/doc/3.9/manual/code-generation/codegen-records/
>
> An then generate Database scheme using this code snippet:
>
> https://www.jooq.org/doc/latest/manual/sql-building/
> ddl-statements/generating-ddl
> <https://www.google.com/url?q=https%3A%2F%2Fwww.jooq.org%2Fdoc%2Flatest%2Fmanual%2Fsql-building%2Fddl-statements%2Fgenerating-ddl&sa=D&sntz=1&usg=AFQjCNH1MpAMlX3_mQ6_9hzmBjzObPGxxw>
>
> Something similar to JPA.
>
> On Thursday, June 8, 2017 at 10:41:06 PM UTC+3, Lukas Eder wrote:
>>
>> It's documented in the manual:
>> https://www.jooq.org/doc/latest/manual/sql-building/ddl-
>> statements/generating-ddl
>>
>> Is that what you're looking for?
>>
>> 2017-06-08 20:33 GMT+02:00 <[email protected]>:
>>
>>> Is there any tutorial or example?
>>>
>>> On Thursday, June 8, 2017 at 7:23:43 PM UTC+3, Lukas Eder wrote:
>>>>
>>>> Hi Peter,
>>>>
>>>> I've seen you've asked the question also on Stack Overflow - here's the
>>>> link for future reference:
>>>> https://stackoverflow.com/questions/26068865/generating-a-
>>>> schema-from-the-jooq-metamodel-in-a-different-sqldialect/
>>>> 26105276?noredirect=1#comment75861873_26105276
>>>>
>>>> Yes, if you have a previously generated jOOQ meta model (or a meta
>>>> model that you construct manually), you can export DDL statements using
>>>> DSLContext.ddl() for single tables, for schemas, or for catalogs. See:
>>>> https://www.jooq.org/javadoc/latest/org/jooq/DSLContext.html
>>>> #ddl-org.jooq.Table-
>>>>
>>>> Hope this helps,
>>>> Lukas
>>>>
>>>> 2017-06-08 12:15 GMT+02:00 <[email protected]>:
>>>>
>>>>> Is there any way to generate SQLite database model from Java code
>>>>> using JOOQ?
>>>>>
>>>>> --
>>>>> 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.
>>>
>>
>> --
> 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.

Reply via email to