All Known Subinterfaces:
JdbcDialect, R2dbcDialect
All Known Implementing Classes:
AbstractDialect, AnsiDialect, Db2Dialect, H2Dialect, H2Dialect, HsqlDbDialect, JdbcDb2Dialect, JdbcMySqlDialect, JdbcPostgresDialect, JdbcSqlServerDialect, MariaDbDialect, MySqlDialect, MySqlDialect, OracleDialect, OracleDialect, PostgresDialect, PostgresDialect, SqlServerDialect, SqlServerDialect

public interface Dialect
Represents a dialect that is implemented by a particular database. Please note that not all features are supported by all vendors. Dialects typically express this with feature flags. Methods for unsupported functionality may throw UnsupportedOperationException.
Since:
1.1
Author:
Mark Paluch, Jens Schauder, Myeonghyeon Lee, Christoph Strobl, Mikhail Polivakha, Chirag Tailor
  • Method Details

    • limit

      LimitClause limit()
      Return the LimitClause used by this dialect.
      Returns:
      the LimitClause used by this dialect.
    • lock

      LockClause lock()
      Return the LockClause used by this dialect.
      Returns:
      the LockClause used by this dialect.
    • getArraySupport

      default ArrayColumns getArraySupport()
      Returns the array support object that describes how array-typed columns are supported by this dialect.
      Returns:
      the array support object that describes how array-typed columns are supported by this dialect.
    • getSelectContext

      SelectRenderContext getSelectContext()
      Returns:
      the SelectRenderContext.
    • getIdentifierProcessing

      default IdentifierProcessing getIdentifierProcessing()
      Returns the IdentifierProcessing used for processing SqlIdentifier when converting them to SQL snippets or parameter names.
      Returns:
      the IdentifierProcessing. Guaranteed to be not null.
      Since:
      2.0
    • getLikeEscaper

      default Escaper getLikeEscaper()
      Returns the Escaper used for LIKE value escaping.
      Returns:
      the Escaper used for LIKE value escaping.
      Since:
      2.0
    • getIdGeneration

      default IdGeneration getIdGeneration()
    • getConverters

      default Collection<Object> getConverters()
      Return a collection of converters for this dialect.
      Returns:
      a collection of converters for this dialect.
    • simpleTypes

      default Set<Class<?>> simpleTypes()
      Return the Set of types considered store native types that can be handeled by the driver.
      Returns:
      never null.
      Since:
      2.3
    • getInsertRenderContext

      default InsertRenderContext getInsertRenderContext()
      Returns:
      an appropriate InsertRenderContext for that specific dialect. for most of the Dialects the default implementation will be valid, but, for example, in case of SqlServerDialect it is not.
      Since:
      2.4
    • orderByNullHandling

      default OrderByNullPrecedence orderByNullHandling()
      Return the OrderByNullPrecedence used by this dialect.
      Returns:
      the OrderByNullPrecedence used by this dialect.
      Since:
      2.4
    • getExistsFunction

      default SimpleFunction getExistsFunction()
      Provide a SQL function that is suitable for implementing an exists-query. The default is `COUNT(1)`, but for some database a `LEAST(COUNT(1), 1)` might be required, which doesn't get accepted by other databases.
      Since:
      3.0
    • supportsSingleQueryLoading

      default boolean supportsSingleQueryLoading()