-
Notifications
You must be signed in to change notification settings - Fork 8
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
Java/jOOQ: Improve documentation #12
Conversation
cb7958d
to
72a8de2
Compare
72a8de2
to
399da69
Compare
- When jOOQ connects to CrateDB, it displays ``SET SESSION STATEMENT WILL BE | ||
IGNORED: extra_float_digits`` on the server console. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think this observation should be carried over to the CrateDB repository by creating an issue?
399da69
to
0c120e9
Compare
by-language/java-jooq/backlog.rst
Outdated
- How to set the default schema name? The ``unqualifiedSchema`` property in | ||
``jooq.gradle`` apparently only accepts ``public`` or ``none``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seut: Coming from #11 (comment), I've added this backlog item.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When thinking about it a second time, it is probably only applicable when connecting to a real database for the code generation step (GH-10).
I think configuring
unqualifiedSchema=none
confuses a bit as in the examples, no schema is used. I think this works as thetestdrive
is passed into the connection string as the database parameter which CrateDB then uses as the default schema name. Maybe rather usetestdrive
here and not inside the connection string and/or use the schema also in the application?
In this scenario, the corresponding setting is probably jooq.configurations.main.generationTool.generator.database.inputSchema
, where I configured to use testdrive
the other day.
cratedb-examples/by-language/java-jooq/jooq.gradle
Lines 70 to 73 in f88eda5
database { | |
name = 'org.jooq.meta.postgres.PostgresDatabase' | |
inputSchema = 'testdrive' | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now also documented at CrateDB/jOOQ backlog » Q & A.
by-language/java-jooq/backlog.rst
Outdated
IGNORED: extra_float_digits`` on the server console. | ||
|
||
- Out of curiosity, validate if, under the hood, the actual abstraction layer | ||
is indeed ``org.hibernate.dialect.PostgreSQL94Dialect``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: Is there any chance we could use a more up-to-date dialect ? Seems like the most recent on is https://github.com/hibernate/hibernate-orm/blob/main/hibernate-core/src/main/java/org/hibernate/dialect/PostgreSQLDialect.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As of jOOQ version 3.17.7, it uses org.hibernate.dialect.PostgreSQL94Dialect
1, and I think there is no way to change that at runtime. I've reflected this detail within the documentation, thanks for asking!
Footnotes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now also documented at CrateDB/jOOQ backlog » Q & A.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, left a minor comment
badccb8
to
c384696
Compare
c384696
to
bfadfdc
Compare
Hi again,
the documentation improvements for the jOOQ example have been split off from GH-11, and are submitted hereby instead.
There has been another round of edits, and a few of them may have some annotations from my side. On others, you may want to have a second look, or also add some comments or questions.
You can directly view the rendered variants of the documents, it is probably more pleasant to read 12.
With kind regards,
Andreas.
Footnotes
https://github.com/crate/cratedb-examples/blob/amo/jooq/improve-docs/by-language/java-jooq/README.rst ↩
https://github.com/crate/cratedb-examples/blob/amo/jooq/improve-docs/by-language/java-jooq/backlog.rst ↩