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:
-
DialectSpringFactoriesLoader
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfaceSPI to extend Spring's default JDBC Dialect discovery mechanism.static classException thrown whenDialectResolvercannot resolve aDialect. -
Method Summary
Modifier and TypeMethodDescriptionstatic DialectgetDialect(org.springframework.jdbc.core.JdbcOperations operations) Retrieve aDialectby inspecting aConnection.
-
Method Details
-
getDialect
Retrieve aDialectby inspecting aConnection.- Parameters:
operations- must not be null.- Returns:
- the resolved
DialectDialectResolver.NoDialectExceptionif the database type cannot be determined fromDataSource. - Throws:
DialectResolver.NoDialectException- if noDialectcan be found.
-