Hi Robert,

Thank you very much for your message. That's a very interesting idea. Most
SQL dialects already support an CREATE <object> [ IF NOT EXISTS ] or an
ALTER <object> [ IF EXISTS ] clause, and jOOQ can emulate it for many SQL
dialects by generating an anonymous block that catches exceptions. But if
we could have an extra statement / predicate that allows for a client to
run this check independently of the actual DDL statement, that would be
even more powerful. It would also be useful to jOOQ's internals.

I've created a feature request for this:
https://github.com/jOOQ/jOOQ/issues/8038

Thanks again,
Lukas

On Sun, Nov 11, 2018 at 6:25 PM Robert Mikes <[email protected]> wrote:

> *Use case: *we have a bootstrap code that creates/updates the database
> structure upon startup. Similarly to liquibase, I need to check if a table
> exists, CREATE it if not and ALTER it if it already exists, in order to
> apply later changes.
>
> *Feature request:* add API to check if a table exists.
>
> See:
> https://stackoverflow.com/questions/24741761/how-to-check-if-a-table-exists-in-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.

Reply via email to