Class DialectResolver
java.lang.Object
org.springframework.data.jdbc.repository.config.DialectResolver
Resolves a
Dialect
. Resolution typically uses JdbcOperations
to obtain and inspect a
Connection
. Dialect resolution uses Spring's spring.factories
to determine
available extensions
.- Since:
- 2.0
- Author:
- Jens Schauder
- See Also:
-
Dialect
SpringFactoriesLoader
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
SPI to extend Spring's default JDBC Dialect discovery mechanism.static class
Exception thrown whenDialectResolver
cannot resolve aDialect
. -
Method Summary
Modifier and TypeMethodDescriptionstatic Dialect
getDialect
(org.springframework.jdbc.core.JdbcOperations operations) Retrieve aDialect
by inspecting aConnection
.
-
Method Details
-
getDialect
Retrieve aDialect
by inspecting aConnection
.- Parameters:
operations
- must not be null.- Returns:
- the resolved
Dialect
DialectResolver.NoDialectException
if the database type cannot be determined fromDataSource
. - Throws:
DialectResolver.NoDialectException
- if noDialect
can be found.
-