Hi Josu,

You can turn off the generation of catalogs by specifying a default catalog:
https://www.jooq.org/doc/latest/manual/code-generation/codegen-advanced/codegen-config-database/codegen-database-catalog-and-schema-mapping/

Or, you can do the same thing at runtime:
https://www.jooq.org/doc/latest/manual/sql-building/dsl-context/custom-settings/settings-render-mapping/

I hope this helps,
Lukas

On Wed, Oct 11, 2023 at 1:35 PM Josu Pagazaurtundua <
jpagazaurtunduae...@gmail.com> wrote:

> Hi,
>
> We are configuring Jooq Maven plugin for automatically generating Java
> code. We generate it by using a CI/CD pipeline with Gitlab CI and we
> version and store the artifact while in develop environment to promote it
> to the rest of the environments without generating the code again.
>
> We use the following configuration:
>
>                     <generator>
>                         <name>org.jooq.codegen.JavaGenerator</name>
>                         <database>
>                             <name>
> org.jooq.meta.sqlserver.SQLServerDatabase</name>
>                             <inputCatalog>DATABASE</inputCatalog>
>                             <includeSql>select DOMAIN_NAME  from
> INFORMATION_SCHEMA.DOMAINS</includeSql>
>                             <includes>Pa.* | Get.*</includes>
>                             <inputSchema>dbo</inputSchema>
>                         </database>
>                         <target>
>                             <packageName>
> org.euskotren.persistence.framework.model</packageName>
>                             <directory>/src/main/java/</directory>
>                         </target>
>                     </generator>
>
>
> The database is a SQL Server and the problem comes with the "inputCatalog"
> tag. While the database model is the same in all of the environments, the
> database name changes with the suffix of the environment (DATABASE-DEV,
> DATABASE-TST, DATABASE-PRO). Is it possible to ignore this argument in
> anyway, or configure in a different way so we can send this parameter as a
> variable? The Java generated code includes it and forces us to generate an
> artifact for each environment.
>
> Thanks a lot
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jooq-user/3aae74d5-eae6-4be2-b0f6-77d4e9560864n%40googlegroups.com
> <https://groups.google.com/d/msgid/jooq-user/3aae74d5-eae6-4be2-b0f6-77d4e9560864n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/CAB4ELO6cZbjrF-N_dZ%3De5cFw47A39nrvMo7DkTMKquQZujfaTQ%40mail.gmail.com.

Reply via email to