Skip to content

GH-2031 Introduced new JDBC dialect counterparts #2036

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mipo256
Copy link
Contributor

@mipo256 mipo256 commented Apr 20, 2025

Closes #2031

The idea is to introduce for each relational Dialect its jdbc counterpart. All the Jdbc dialects that were already in place (there were a couple of those) and added ones now extend the JdbcDialect and their corresponding relational counterpart.

CC: @mp911de @schauder

@@ -109,23 +111,23 @@ public Optional<Dialect> getDialect(JdbcOperations operations) {
}

@Nullable
private static Dialect getDialect(Connection connection) throws SQLException {
private static JdbcDialect getDialect(Connection connection) throws SQLException {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, here I am not sure what is the best solution. Let me clarify. The JdbcDialectProvider interface is defined like this:

public interface JdbcDialectProvider {
  Optional<Dialect> getDialect(JdbcOperations operations);
}

The common sense dictates, that since it is a DialectProvider for JDBC, then the returned dialect is supposed to be an instance of JdbcDialect. However, such type migration change would not be backward compatible.

The solution I can think of is to deprecate this method in the interface, and maybe even make JdbcDialectProvider a top-level interface, instead of being an inner one. And in this case, we can direct users to a new interface to be used, where getDialect method returns the Optional<JdbcDialect>

If we just deprecate the JdbcDialectProvider#getDialect method, we will not be able to say at the moment what is the replacement.

Maybe I'm just overcomplicating things... I need your option, Mark @mp911de

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce JDBC-specific dialects in JDBC module
2 participants