Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module: Jooq #9235

Open
murdos opened this issue Mar 15, 2024 · 13 comments
Open

Module: Jooq #9235

murdos opened this issue Mar 15, 2024 · 13 comments
Assignees
Labels
area: feature request 💡 $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ theme: database $500 https://www.jhipster.tech/bug-bounties/

Comments

@murdos
Copy link
Contributor

murdos commented Mar 15, 2024

Jooq is a nice alternative to JPA.
It would be great if jhlite supports it.

If integration of jooq-generator (as build plugin) is possible with liquibase/flyway, that would be awesome (using testcontainers-jooq-codegen-maven-plugin?)

@pascalgrimaud pascalgrimaud changed the title Jooq module Module: Jooq Mar 20, 2024
@fabienpuissant
Copy link
Collaborator

Started to work on it
Configuration seems ok: https://github.com/fabienpuissant/jhipsterlite-jooq/tree/postgres-liquibase

Need to find relevant example to initialize module

Let me know if you use the plugin that way

@murdos
Copy link
Contributor Author

murdos commented Sep 27, 2024

@fabienpuissant : exemple repo looks fine!

@fabienpuissant
Copy link
Collaborator

Not convinced about what to do as an axample for the initialization

Only the configuration without any example is enough ?

Or maybe should I keep a CRUD repository example without the infrastructure primary to avoid RestController ?

@murdos
Copy link
Contributor Author

murdos commented Sep 27, 2024

Jooq module(s) should not contain any sample code, only all the setup.
If you want you can also provide an additional sample module, you can look there are already some.

@murdos
Copy link
Contributor Author

murdos commented Sep 27, 2024

Regarding modules organisation, here's a proposal:

  • rename existing postgresql to jpa-postgresl, MySQL to jpa-mysql, ...
  • have a feature 'jooq', with modules jooq-postgresql, jooq-mysql, ...
  • have another feature 'jooq-codegen-liquibase' with modules for postgresql, MySQL
  • and have a feature 'jooq-codegen-flyway'

WDYT?

@fabienpuissant
Copy link
Collaborator

I was thinking about that since hibernate config was loaded by default
Separate the modules this way seems to be a good idea

But I don't get last two points, I would include testcontainers codegen by default in jooq-xxxxx module no ?

As I understood, jooq need a codegen anyway. So you want to separate the default codegen and the testcontainer codegen in two modules ?

@murdos
Copy link
Contributor Author

murdos commented Sep 28, 2024

But I don't get last two points, I would include testcontainers codegen by default in jooq-xxxxx module no ?

If you include testcontainers codegen by default in jooq-xxxxx, it means you already have chosen between liquibase and flyway?
Or I'm missing something?

As I understood, jooq need a codegen anyway. So you want to separate the default codegen and the testcontainer codegen in two modules ?

Indeed, I would separate things. So you can use jooq-postgresql module, and manually use the official jooq codegen maven plugin rather than the testcontainers one (that only support postgres, mysql and mariadb: no support for mssql e.g.).

BTW we will have to find a gradle equivalent of the testcontainers codegen maven plugin (in a first step we can declare a dependency to maven to explicitly disable gradle)

@pascalgrimaud
Copy link
Member

An idea to provide example is to add a small documentation, in a markdown file. It would be enough

@pascalgrimaud pascalgrimaud added $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $500 https://www.jhipster.tech/bug-bounties/ labels Sep 28, 2024
@fabienpuissant
Copy link
Collaborator

But I don't get last two points, I would include testcontainers codegen by default in jooq-xxxxx module no ?

If you include testcontainers codegen by default in jooq-xxxxx, it means you already have chosen between liquibase and flyway? Or I'm missing something?

As I understood, jooq need a codegen anyway. So you want to separate the default codegen and the testcontainer codegen in two modules ?

Indeed, I would separate things. So you can use jooq-postgresql module, and manually use the official jooq codegen maven plugin rather than the testcontainers one (that only support postgres, mysql and mariadb: no support for mssql e.g.).

BTW we will have to find a gradle equivalent of the testcontainers codegen maven plugin (in a first step we can declare a dependency to maven to explicitly disable gradle)

Yeah my idea was to reduce complexity by including testcontainers codegen directly into jooq-postgresql module for example.

But lets separate different codegens if you think it's needed and I wasn't aware that the testcontainers one is not supporting all db

@pascalgrimaud
Copy link
Member

@murdos @fabienpuissant : can it be closed?

@fabienpuissant
Copy link
Collaborator

There still a lot to do to fully supports jooq

Gradle compatibility

Liquibase integration

Flyway integration

Using jooq under test container plugin (for maven ans gradle)

@murdos
Copy link
Contributor Author

murdos commented Nov 14, 2024

@pascalgrimaud : no, there's still some work to do:

@pascalgrimaud
Copy link
Member

In this case, maybe we should split into smaller tickets, and link to this one, which will be the main?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: feature request 💡 $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ theme: database $500 https://www.jhipster.tech/bug-bounties/
Projects
None yet
Development

No branches or pull requests

3 participants