-
Notifications
You must be signed in to change notification settings - Fork 356
Introduce JDBC-specific dialects in JDBC module #2031
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I can take a look in here, since I'm already in the context of the problem @mp911de |
So far we did this on a as-needed basis. See for example We DO have an inconsistency here: R2DBC dialects have the same name as their relational counter part, while the JDBC variants have a This is something we could unify for 4.0. i.e. creating new classes and deprecating old ones on Not sure if we always should create a JDBC variant, even when it just extends the base class. |
Having a JDBC-specific subinterface and distinguishing between the R2DBC dialects makes sense. Dialect specifics make sense on the relational level when considering functionality that is dialect-specific (note: not driver-specific) such as array handling, expressing limit clauses, locks (in the SQL statement) and some more details.
|
As written above: the JDBC specific interface already exists and so do JDBC specific implementations. The differences to the way it is handled in R2DBC are:
|
I got it, thanks @schauder, I'll submit a PR shortly |
Signed-off-by: mipo256 <mikhailpolivakha@gmail.com>
Signed-off-by: mipo256 <mikhailpolivakha@gmail.com>
The problem became evident while working on the following PR #2024.
We have a
Dialect
interface abstraction, that resides in the relational module. That makes sense, since several capabilities can be re-used in bothjdbc
andr2dbc
modules. We then have a common dialects (that also reside in therelational
module) likePostgresDialect
orH2Dialect
.For
r2dbc
, there is no problem - we have a separatePostgresDialect
class, that resides in ther2dbc
(!) module, and that extends thePostgresDialect
inrelational
module. Therefore, ther2dbc
'sPostgresDialect
can use all the features that reside in the r2dbc module, as it should.In case of
jdbc
- we have a problem. The dialects that we use injdbc
module are really placed in therelational
module. That becomes a big deal, when we want (and we probably should want) to use somejdbc
specific functionality (likejava.sql.SQLType
) in the dialect that is supposed to be used inspring-data-jdbc
.Soltuion: the way the dialecfts are now structured in
r2dbc
is the right way to go in my opinion, and injdbc
module we should not use the dialects inrelational
module, we should provide classes that extend them in thejdbc
module, so we can allow these dialects to use jdbc-specific features.The text was updated successfully, but these errors were encountered: