org.springframework.data.jdbc.repository.config

## Class DialectResolver

- java.lang.Object
- - org.springframework.data.jdbc.repository.config.DialectResolver

    public class DialectResolver
    extends Object

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

Nested Classes
`static class` `DialectResolver.DefaultDialectProvider`
`static interface` `DialectResolver.JdbcDialectProvider` SPI to extend Spring's default JDBC Dialect discovery mechanism.
`static class` `DialectResolver.NoDialectException` Exception thrown when `DialectResolver` cannot resolve a `Dialect`.

### Method Summary

All Methods Static Methods Concrete Methods
`static Dialect` `getDialect(JdbcOperations operations)` Retrieve a `Dialect` by inspecting a `Connection`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### getDialect

    public static Dialect getDialect(JdbcOperations operations)

Retrieve a `Dialect` by inspecting a `Connection`.

Parameters:
  `operations` - must not be null.
Returns:
  the resolved `Dialect` `DialectResolver.NoDialectException` if the database type cannot be determined from `DataSource`.
Throws:
  `DialectResolver.NoDialectException` - if no `Dialect` can be found.