Hi Sergii,

Thank you very much for your question. Currently, this isn't possible - and
I used to say that jOOQ won't do that, but hey! We now have an experimental
parser since jOOQ 3.9! It would be a very nice way to improve the parser if
we increased its jOOQ-internal usage by adding a new DDLDatabase to
jooq-meta. I've registered a feature reqeust for this:
https://github.com/jOOQ/jOOQ/issues/6005

Feel free to comment also on the above issue, if you feel I'm missing
something.

In the meantime, yes, you'll have to actually create this database and
generate code from that. It's not that much overhead, you could use Flyway,
for instance.

Thanks again,
Lukas

2017-03-23 9:51 GMT+01:00 <[email protected]>:

> I have DDL like this
>
> CREATE TABLE user (
>
>   id   INTEGER,
>
>   name TEXT
>
> );
>
>
> CREATE TABLE photo (
>
>   url    TEXT,
>
>   userId INTEGER,
>
>   FOREIGN KEY (userId) REFERENCES user(id)
>
> );
>
> Is it possible to generate a code out of it?
>
> This suppose to be used with SQLite.
>
> As possible solution I can create an empty db during generate task and then 
> generate code out of that empty db.
> However I'd rather avoid additional complexity in build scripts if possible.
>
> Best regards,
> Sergii
>
> --
> 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