Class Dialect

    • Field Detail

      • DEFAULT_BATCH_SIZE

        public static final String DEFAULT_BATCH_SIZE
        Defines a default batch size constant
        See Also:
        Constant Field Values
      • CLOSED_QUOTE

        public static final String CLOSED_QUOTE
        Characters used as closing for quoting SQL identifiers
        See Also:
        Constant Field Values
      • LEGACY_LOB_MERGE_STRATEGY

        protected static final LobMergeStrategy LEGACY_LOB_MERGE_STRATEGY
        The legacy behavior of Hibernate. LOBs are not processed by merge
      • STREAM_XFER_LOB_MERGE_STRATEGY

        protected static final LobMergeStrategy STREAM_XFER_LOB_MERGE_STRATEGY
        Merge strategy based on transferring contents based on streams.
      • NEW_LOCATOR_LOB_MERGE_STRATEGY

        protected static final LobMergeStrategy NEW_LOCATOR_LOB_MERGE_STRATEGY
        Merge strategy based on creating a new LOB locator.
      • STANDARD_DEFAULT_BATCH_LOAD_SIZING_STRATEGY

        protected final BatchLoadSizingStrategy STANDARD_DEFAULT_BATCH_LOAD_SIZING_STRATEGY
    • Constructor Detail

      • Dialect

        protected Dialect()
    • Method Detail

      • registerDefaultKeywords

        protected void registerDefaultKeywords()
      • resolveSqlTypeDescriptor

        public JdbcType resolveSqlTypeDescriptor​(String columnTypeName,
                                                 int jdbcTypeCode,
                                                 int precision,
                                                 int scale,
                                                 JdbcTypeRegistry jdbcTypeRegistry)
      • resolveSqlTypeLength

        public int resolveSqlTypeLength​(String columnTypeName,
                                        int jdbcTypeCode,
                                        int precision,
                                        int scale,
                                        int displaySize)
      • binaryToDecimalPrecision

        protected static Size binaryToDecimalPrecision​(int code,
                                                       Size size)
        Useful conversion for databases which represent the precision of a float(p) using p expressed in decimal digits instead of the usual (standard) binary digits.
      • getBooleanCheckCondition

        public String getBooleanCheckCondition​(String columnName,
                                               int sqlType,
                                               char falseChar,
                                               char trueChar)
        Render a SQL check condition for a column that represents a boolean value.
      • getEnumCheckCondition

        public String getEnumCheckCondition​(String columnName,
                                            int sqlType,
                                            Class<? extends Enum<?>> enumClass)
        Render a SQL check condition for a column that represents an enumerated value.
      • getVersion

        public abstract int getVersion()
      • initializeFunctionRegistry

        public void initializeFunctionRegistry​(QueryEngine queryEngine)
        Initialize the given registry with any dialect-specific functions. Support for certain SQL functions is required, and if the database does not support a required function, then the dialect must define a way to emulate it. These required functions include the functions defined by the JPA query language specification:
        • avg(arg) - aggregate function
        • count([distinct ]arg) - aggregate function
        • max(arg) - aggregate function
        • min(arg) - aggregate function
        • sum(arg) - aggregate function
        • coalesce(arg0, arg1, ...)
        • nullif(arg0, arg1)
        • lower(arg)
        • upper(arg)
        • length(arg)
        • concat(arg0, arg1, ...)
        • locate(pattern, string[, start])
        • substring(string, start[, length])
        • trim([[spec ][character ]from] string)
        • abs(arg)
        • mod(arg0, arg1)
        • sqrt(arg)
        • current date
        • current time
        • current timestamp
        Along with an additional set of functions defined by ANSI SQL:
        • any(arg) - aggregate function
        • every(arg) - aggregate function
        • cast(arg as Type)
        • extract(field from arg)
        • ln(arg)
        • exp(arg)
        • power(arg0, arg1)
        • floor(arg)
        • ceiling(arg)
        • position(pattern in string)
        • substring(string from start[ for length])
        • overlay(string placing replacement from start[ for length])
        And the following functions for working with java.time types:
        • local date
        • local time
        • local datetime
        • offset datetime
        • instant
        And a number of additional "standard" functions:
        • left(string, length)
        • right(string, length)
        • replace(string, pattern, replacement)
        • pad(string with length spec[ character])
        • sign(arg)
        • sin(arg)
        • cos(arg)
        • tan(arg)
        • asin(arg)
        • acos(arg)
        • atan(arg)
        • atan2(arg0, arg1)
        • round(arg0, arg1)
        • least(arg0, arg1, ...)
        • greatest(arg0, arg1, ...)
        • format(datetime as pattern)
        • str(arg) - synonym of cast(a as String)
        • ifnull(arg0, arg1) - synonym of coalesce(a, b)
        Finally, the following functions are defined as abbreviations for extract(), and desugared by the parser:
        • second(arg) - synonym of extract(second from a)
        • minute(arg) - synonym of extract(minute from a)
        • hour(arg) - synonym of extract(hour from a)
        • day(arg) - synonym of extract(day from a)
        • month(arg) - synonym of extract(month from a)
        • year(arg) - synonym of extract(year from a)
      • currentDate

        public String currentDate()
        Translation of the HQL/JPQL current_date function, which maps to the Java type java.sql.Date, and of the HQL local_date function which maps to the Java type java.sql.LocalDate.
      • currentTime

        public String currentTime()
        Translation of the HQL/JPQL current_time function, which maps to the Java type java.sql.Time which is a time with no time zone. This contradicts ANSI SQL where current_time has the type TIME WITH TIME ZONE.

        It is recommended to override this in dialects for databases which support localtime or time at local.

      • currentTimestamp

        public String currentTimestamp()
        Translation of the HQL/JPQL current_timestamp function, which maps to the Java type java.sql.Timestamp which is a datetime with no time zone. This contradicts ANSI SQL where current_timestamp has the type TIMESTAMP WITH TIME ZONE.

        It is recommended to override this in dialects for databases which support localtimestamp or timestamp at local.

      • currentLocalTime

        public String currentLocalTime()
        Translation of the HQL local_time function, which maps to the Java type java.time.LocalTime which is a time with no time zone. It should usually be the same SQL function as for currentTime().

        It is recommended to override this in dialects for databases which support localtime or current_time at local.

      • currentLocalTimestamp

        public String currentLocalTimestamp()
        Translation of the HQL local_datetime function, which maps to the Java type java.time.LocalDateTime which is a datetime with no time zone. It should usually be the same SQL function as for currentTimestamp().

        It is recommended to override this in dialects for databases which support localtimestamp or current_timestamp at local.

      • currentTimestampWithTimeZone

        public String currentTimestampWithTimeZone()
        Translation of the HQL offset_datetime function, which maps to the Java type java.time.OffsetDateTime which is a datetime with a time zone. This in principle correctly maps to the ANSI SQL current_timestamp which has the type TIMESTAMP WITH TIME ZONE.
      • castPattern

        public String castPattern​(CastType from,
                                  CastType to)
        Obtain a pattern for the SQL equivalent to a cast() function call. The resulting pattern must contain ?1 and ?2 placeholders for the arguments.
        Parameters:
        from - a CastType indicating the type of the value argument
        to - a CastType indicating the type the value argument is cast to
      • trimPattern

        public String trimPattern​(TrimSpec specification,
                                  char character)
        Obtain a pattern for the SQL equivalent to a trim() function call. The resulting pattern must contain a ?1 placeholder for the argument of type String.
        Parameters:
        specification - leading or trailing
        character - the character to trim
      • supportsFractionalTimestampArithmetic

        public boolean supportsFractionalTimestampArithmetic()
        Whether the database supports adding a fractional interval to a timestamp e.g. `timestamp + 0.5 second`
      • timestampdiffPattern

        public String timestampdiffPattern​(TemporalUnit unit,
                                           jakarta.persistence.TemporalType fromTemporalType,
                                           jakarta.persistence.TemporalType toTemporalType)
        Obtain a pattern for the SQL equivalent to a timestampdiff() function call. The resulting pattern must contain ?1, ?2, and ?3 placeholders for the arguments.
        Parameters:
        unit - the first argument
        fromTemporalType - true if the first argument is a timestamp, false if a date
        toTemporalType - true if the second argument is
      • timestampaddPattern

        public String timestampaddPattern​(TemporalUnit unit,
                                          jakarta.persistence.TemporalType temporalType,
                                          IntervalType intervalType)
        Obtain a pattern for the SQL equivalent to a timestampadd() function call. The resulting pattern must contain ?1, ?2, and ?3 placeholders for the arguments.
        Parameters:
        unit - The unit to add to the temporal
        temporalType - The type of the temporal
        intervalType - The type of interval to add or null if it's not a native interval
      • equivalentTypes

        public boolean equivalentTypes​(int typeCode1,
                                       int typeCode2)
        Do the given JDBC type codes, as defined in Types represent essentially the same type in this dialect of SQL? The default implementation treats NUMERIC and DECIMAL as the same type, and FLOAT, REAL, and DOUBLE as essentially the same type, since the ANSI SQL specification fails to meaningfully distinguish them.
        Parameters:
        typeCode1 - the first JDBC type code
        typeCode2 - the second JDBC type code
        Returns:
        true if the two type codes are equivalent
      • getDefaultProperties

        public final Properties getDefaultProperties()
        Retrieve a set of default Hibernate properties for this database.
        Returns:
        a set of Hibernate properties
      • contributeTypes

        public void contributeTypes​(TypeContributions typeContributions,
                                    ServiceRegistry serviceRegistry)
        Allows the Dialect to contribute additional types
        Parameters:
        typeContributions - Callback to contribute the types
        serviceRegistry - The service registry
      • getRawTypeName

        public String getRawTypeName​(int code)
                              throws HibernateException
        Get the name of the database type associated with the given Types typecode, with no length, precision, or scale.
        Parameters:
        code - The Types typecode
        Returns:
        the database type name
        Throws:
        HibernateException - If no mapping was specified for that type.
      • getTypeName

        public String getTypeName​(int code,
                                  Size size)
                           throws HibernateException
        Get the name of the database type associated with the given java.sql.Types typecode.
        Parameters:
        code - java.sql.Types typecode
        size - the length, precision, scale of the column
        Returns:
        the database type name
        Throws:
        HibernateException
      • getTypeName

        public String getTypeName​(JdbcType jdbcType,
                                  Size size)
        Get the name of the database type associated with the given SqlTypeDescriptor.
        Parameters:
        jdbcType - the SQL type
        size - the length, precision, scale of the column
        Returns:
        the database type name
      • getCastTypeName

        public String getCastTypeName​(SqlExpressable type,
                                      Long length,
                                      Integer precision,
                                      Integer scale)
        Get the name of the database type appropriate for casting operations (via the CAST() SQL function) for the given SqlExpressable SQL type.
        Returns:
        The database type name
      • registerColumnType

        protected void registerColumnType​(int code,
                                          long capacity,
                                          String name)
        Subclasses register a type name for the given type code and maximum column length. $l in the type name with be replaced by the column length (if appropriate).
        Parameters:
        code - The Types typecode
        capacity - The maximum length of database type
        name - The database type name
      • registerColumnType

        protected void registerColumnType​(int code,
                                          String name)
        Subclasses register a type name for the given type code. $l in the type name with be replaced by the column length (if appropriate).
        Parameters:
        code - The Types typecode
        name - The database type name
      • getHibernateTypeName

        public String getHibernateTypeName​(int code)
                                    throws HibernateException
        Get the name of the Hibernate Type associated with the given Types type code.
        Parameters:
        code - The Types type code
        Returns:
        The Hibernate Type name.
        Throws:
        HibernateException - If no mapping was specified for that type.
      • isTypeNameRegistered

        public boolean isTypeNameRegistered​(String typeName)
        Whether or not the given type name has been registered for this dialect (including both hibernate type names and custom-registered type names).
        Parameters:
        typeName - the type name.
        Returns:
        true if the given string has been registered either as a hibernate type or as a custom-registered one
      • getHibernateTypeName

        public String getHibernateTypeName​(int code,
                                           Integer length,
                                           Integer precision,
                                           Integer scale)
                                    throws HibernateException
        Get the name of the Hibernate Type associated with the given Types typecode with the given storage specification parameters.
        Parameters:
        code - The Types typecode
        length - The datatype length
        precision - The datatype precision
        scale - The datatype scale
        Returns:
        The Hibernate Type name.
        Throws:
        HibernateException - If no mapping was specified for that type.
      • registerHibernateType

        protected void registerHibernateType​(int code,
                                             long capacity,
                                             String name)
        Registers a Hibernate Type name for the given Types type code and maximum column length.
        Parameters:
        code - The Types typecode
        capacity - The maximum length of database type
        name - The Hibernate Type name
      • registerHibernateType

        protected void registerHibernateType​(int code,
                                             String name)
        Registers a Hibernate Type name for the given Types type code.
        Parameters:
        code - The Types typecode
        name - The Hibernate Type name
      • getNativeIdentifierGeneratorStrategy

        public String getNativeIdentifierGeneratorStrategy()
        Resolves the native generation strategy associated to this dialect.

        Comes into play whenever the user specifies the native generator.

        Returns:
        The native generator strategy.
      • getQuerySequencesString

        public String getQuerySequencesString()
        Get the select command used retrieve the names of all sequences.
        Returns:
        The select command; or null if sequences are not supported.
        See Also:
        org.hibernate.tool.hbm2ddl.SchemaUpdate
      • getSelectGUIDString

        public String getSelectGUIDString()
        Get the command used to select a GUID from the underlying database.

        Optional operation.

        Returns:
        The appropriate command.
      • supportsTemporaryTables

        public boolean supportsTemporaryTables()
      • supportsLockTimeouts

        public boolean supportsLockTimeouts()
        Informational metadata about whether this dialect is known to support specifying timeouts for requested lock acquisitions.
        Returns:
        True is this dialect supports specifying lock timeouts.
      • isLockTimeoutParameterized

        public boolean isLockTimeoutParameterized()
        If this dialect supports specifying lock timeouts, are those timeouts rendered into the SQL string as parameters. The implication is that Hibernate will need to bind the timeout value as a parameter in the PreparedStatement. If true, the param position is always handled as the last parameter; if the dialect specifies the lock timeout elsewhere in the SQL statement then the timeout value should be directly rendered into the statement and this method should return false.
        Returns:
        True if the lock timeout is rendered into the SQL string as a parameter; false otherwise.
      • getLockingStrategy

        public LockingStrategy getLockingStrategy​(Lockable lockable,
                                                  LockMode lockMode)
        Get a strategy instance which knows how to acquire a database-level lock of the specified mode for this dialect.
        Parameters:
        lockable - The persister for the entity to be locked.
        lockMode - The type of lock to be acquired.
        Returns:
        The appropriate locking strategy.
        Since:
        3.2
      • getForUpdateString

        public String getForUpdateString​(LockOptions lockOptions)
        Given LockOptions (lockMode, timeout), determine the appropriate for update fragment to use.
        Parameters:
        lockOptions - contains the lock mode to apply.
        Returns:
        The appropriate for update fragment.
      • getForUpdateString

        public String getForUpdateString​(LockMode lockMode)
        Given a lock mode, determine the appropriate for update fragment to use.
        Parameters:
        lockMode - The lock mode to apply.
        Returns:
        The appropriate for update fragment.
      • getForUpdateString

        public String getForUpdateString()
        Get the string to append to SELECT statements to acquire locks for this dialect.
        Returns:
        The appropriate FOR UPDATE clause string.
      • getWriteLockString

        public String getWriteLockString​(int timeout)
        Get the string to append to SELECT statements to acquire WRITE locks for this dialect. Location of the returned string is treated the same as getForUpdateString.
        Parameters:
        timeout - in milliseconds, -1 for indefinite wait and 0 for no wait.
        Returns:
        The appropriate LOCK clause string.
      • getWriteLockString

        public String getWriteLockString​(String aliases,
                                         int timeout)
        Get the string to append to SELECT statements to acquire WRITE locks for this dialect given the aliases of the columns to be write locked. Location of the of the returned string is treated the same as getForUpdateString.
        Parameters:
        aliases - The columns to be read locked.
        timeout - in milliseconds, -1 for indefinite wait and 0 for no wait.
        Returns:
        The appropriate LOCK clause string.
      • getReadLockString

        public String getReadLockString​(int timeout)
        Get the string to append to SELECT statements to acquire READ locks for this dialect. Location of the returned string is treated the same as getForUpdateString.
        Parameters:
        timeout - in milliseconds, -1 for indefinite wait and 0 for no wait.
        Returns:
        The appropriate LOCK clause string.
      • getReadLockString

        public String getReadLockString​(String aliases,
                                        int timeout)
        Get the string to append to SELECT statements to acquire READ locks for this dialect given the aliases of the columns to be read locked. Location of the returned string is treated the same as getForUpdateString.
        Parameters:
        aliases - The columns to be read locked.
        timeout - in milliseconds, -1 for indefinite wait and 0 for no wait.
        Returns:
        The appropriate LOCK clause string.
      • getWriteRowLockStrategy

        public RowLockStrategy getWriteRowLockStrategy()
        The row lock strategy to use for write locks.
      • getReadRowLockStrategy

        public RowLockStrategy getReadRowLockStrategy()
        The row lock strategy to use for read locks.
      • supportsOuterJoinForUpdate

        public boolean supportsOuterJoinForUpdate()
        Does this dialect support FOR UPDATE in conjunction with outer joined rows?
        Returns:
        True if outer joined rows can be locked via FOR UPDATE.
      • getForUpdateString

        public String getForUpdateString​(String aliases)
        Get the FOR UPDATE OF column_list fragment appropriate for this dialect given the aliases of the columns to be write locked.
        Parameters:
        aliases - The columns to be write locked.
        Returns:
        The appropriate FOR UPDATE OF column_list clause string.
      • getForUpdateString

        public String getForUpdateString​(String aliases,
                                         LockOptions lockOptions)
        Get the FOR UPDATE OF column_list fragment appropriate for this dialect given the aliases of the columns to be write locked.
        Parameters:
        aliases - The columns to be write locked.
        lockOptions - the lock options to apply
        Returns:
        The appropriate FOR UPDATE OF column_list clause string.
      • getForUpdateNowaitString

        public String getForUpdateNowaitString()
        Retrieves the FOR UPDATE NOWAIT syntax specific to this dialect.
        Returns:
        The appropriate FOR UPDATE NOWAIT clause string.
      • getForUpdateSkipLockedString

        public String getForUpdateSkipLockedString()
        Retrieves the FOR UPDATE SKIP LOCKED syntax specific to this dialect.
        Returns:
        The appropriate FOR UPDATE SKIP LOCKED clause string.
      • getForUpdateNowaitString

        public String getForUpdateNowaitString​(String aliases)
        Get the FOR UPDATE OF column_list NOWAIT fragment appropriate for this dialect given the aliases of the columns to be write locked.
        Parameters:
        aliases - The columns to be write locked.
        Returns:
        The appropriate FOR UPDATE OF colunm_list NOWAIT clause string.
      • getForUpdateSkipLockedString

        public String getForUpdateSkipLockedString​(String aliases)
        Get the FOR UPDATE OF column_list SKIP LOCKED fragment appropriate for this dialect given the aliases of the columns to be write locked.
        Parameters:
        aliases - The columns to be write locked.
        Returns:
        The appropriate FOR UPDATE colunm_list SKIP LOCKED clause string.
      • appendLockHint

        public String appendLockHint​(LockOptions lockOptions,
                                     String tableName)
        Some dialects support an alternative means to SELECT FOR UPDATE, whereby a "lock hint" is appended to the table name in the from clause.

        contributed by Helge Schulz

        Parameters:
        lockOptions - The lock options to apply
        tableName - The name of the table to which to apply the lock hint.
        Returns:
        The table with any required lock hints.
      • applyLocksToSql

        public String applyLocksToSql​(String sql,
                                      LockOptions aliasedLockOptions,
                                      Map<String,​String[]> keyColumnNames)
        Modifies the given SQL by applying the appropriate updates for the specified lock modes and key columns.

        The behavior here is that of an ANSI SQL SELECT FOR UPDATE. This method is really intended to allow dialects which do not support SELECT FOR UPDATE to achieve this in their own fashion.

        Parameters:
        sql - the SQL string to modify
        aliasedLockOptions - lock options indexed by aliased table names.
        keyColumnNames - a map of key columns indexed by aliased table names.
        Returns:
        the modified SQL string.
      • getCreateTableString

        public String getCreateTableString()
        Command used to create a table.
        Returns:
        The command used to create a table.
      • getAlterTableString

        public String getAlterTableString​(String tableName)
        Command used to alter a table.
        Parameters:
        tableName - The name of the table to alter
        Returns:
        The command used to alter a table.
        Since:
        5.2.11
      • getCreateMultisetTableString

        public String getCreateMultisetTableString()
        Slight variation on getCreateTableString(). Here, we have the command used to create a table when there is no primary key and duplicate rows are expected.

        Most databases do not care about the distinction; originally added for Teradata support which does care.

        Returns:
        The command used to create a multiset table.
      • registerResultSetOutParameter

        public int registerResultSetOutParameter​(CallableStatement statement,
                                                 int position)
                                          throws SQLException
        Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of returning ResultSet *by position*. Pre-Java 8, registering such ResultSet-returning parameters varied greatly across database and drivers; hence its inclusion as part of the Dialect contract.
        Parameters:
        statement - The callable statement.
        position - The bind position at which to register the output param.
        Returns:
        The number of (contiguous) bind positions used.
        Throws:
        SQLException - Indicates problems registering the param.
      • registerResultSetOutParameter

        public int registerResultSetOutParameter​(CallableStatement statement,
                                                 String name)
                                          throws SQLException
        Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of returning ResultSet *by name*. Pre-Java 8, registering such ResultSet-returning parameters varied greatly across database and drivers; hence its inclusion as part of the Dialect contract.
        Parameters:
        statement - The callable statement.
        name - The parameter name (for drivers which support named parameters).
        Returns:
        The number of (contiguous) bind positions used.
        Throws:
        SQLException - Indicates problems registering the param.
      • supportsCurrentTimestampSelection

        public boolean supportsCurrentTimestampSelection()
        Does this dialect support a way to retrieve the database's current timestamp value?
        Returns:
        True if the current timestamp can be retrieved; false otherwise.
      • isCurrentTimestampSelectStringCallable

        public boolean isCurrentTimestampSelectStringCallable()
        Should the value returned by getCurrentTimestampSelectString() be treated as callable. Typically this indicates that JDBC escape syntax is being used...
        Returns:
        True if the getCurrentTimestampSelectString() return is callable; false otherwise.
      • getCurrentTimestampSelectString

        public String getCurrentTimestampSelectString()
        Retrieve the command used to retrieve the current timestamp from the database.
        Returns:
        The command.
      • buildSQLExceptionConversionDelegate

        public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate()
        Build an instance of a SQLExceptionConversionDelegate for interpreting dialect-specific error or SQLState codes.

        If this method is overridden to return a non-null value, the default SQLExceptionConverter will use the returned SQLExceptionConversionDelegate in addition to the following standard delegates:

        1. a "static" delegate based on the JDBC 4 defined SQLException hierarchy;
        2. a delegate that interprets SQLState codes for either X/Open or SQL-2003 codes, depending on java.sql.DatabaseMetaData#getSQLStateType

        It is strongly recommended that specific Dialect implementations override this method, since interpretation of a SQL error is much more accurate when based on the vendor-specific ErrorCode rather than the SQLState.

        Specific Dialects may override to return whatever is most appropriate for that vendor.

        Returns:
        The SQLExceptionConversionDelegate for this dialect
      • getSelectClauseNullString

        public String getSelectClauseNullString​(int sqlType)
        Given a Types type code, determine an appropriate null value to use in a select clause.

        One thing to consider here is that certain databases might require proper casting for the nulls here since the select here will be part of a UNION/UNION ALL.

        Parameters:
        sqlType - The Types type code.
        Returns:
        The appropriate select clause value fragment.
      • supportsUnionAll

        public boolean supportsUnionAll()
        Does this dialect support UNION ALL.
        Returns:
        True if UNION ALL is supported; false otherwise.
      • supportsUnionInSubquery

        public boolean supportsUnionInSubquery()
        Does this dialect support UNION in a subquery.
        Returns:
        True if UNION is supported ina subquery; false otherwise.
      • getNoColumnsInsertString

        public String getNoColumnsInsertString()
        The fragment used to insert a row without specifying any column values. This is not possible on some databases.
        Returns:
        The appropriate empty values clause.
      • supportsNoColumnsInsert

        public boolean supportsNoColumnsInsert()
        Check if the INSERT statement is allowed to contain no column.
        Returns:
        if the Dialect supports no-column INSERT.
      • getLowercaseFunction

        public String getLowercaseFunction()
        The name of the SQL function that transforms a string to lowercase
        Returns:
        The dialect-specific lowercase function.
      • getCaseInsensitiveLike

        public String getCaseInsensitiveLike()
        The name of the SQL function that can do case insensitive like comparison.
        Returns:
        The dialect-specific "case insensitive" like function.
      • supportsCaseInsensitiveLike

        public boolean supportsCaseInsensitiveLike()
        Does this dialect support case insensitive LIKE restrictions?
        Returns:
        true if the underlying database supports case insensitive like comparison, false otherwise. The default is false.
      • supportsTruncateWithCast

        public boolean supportsTruncateWithCast()
        Does this dialect support truncation of values to a specified length through a cast?
        Returns:
        true if the underlying database supports truncation through a cast, false otherwise. The default is true.
      • transformSelectString

        public String transformSelectString​(String select)
        Meant as a means for end users to affect the select strings being sent to the database and perhaps manipulate them in some fashion.
        Parameters:
        select - The select command
        Returns:
        The mutated select command, or the same as was passed in.
      • getMaxAliasLength

        public int getMaxAliasLength()
        What is the maximum length Hibernate can use for generated aliases?

        The maximum here should account for the fact that Hibernate often needs to append "uniqueing" information to the end of generated aliases. That "uniqueing" information will be added to the end of a identifier generated to the length specified here; so be sure to leave some room (generally speaking 5 positions will suffice).

        Returns:
        The maximum length.
      • toBooleanValueString

        public String toBooleanValueString​(boolean bool)
        The SQL literal value to which this database maps boolean values.
        Parameters:
        bool - The boolean value
        Returns:
        The appropriate SQL literal.
      • appendBooleanValueString

        public void appendBooleanValueString​(SqlAppender appender,
                                             boolean bool)
      • registerKeyword

        protected void registerKeyword​(String word)
      • getKeywords

        public Set<String> getKeywords()
        The keywords of the SQL dialect
      • openQuote

        public char openQuote()
        The character specific to this dialect used to begin a quoted identifier.
        Returns:
        The dialect's specific open quote character.
      • closeQuote

        public char closeQuote()
        The character specific to this dialect used to close a quoted identifier.
        Returns:
        The dialect's specific close quote character.
      • quote

        public final String quote​(String name)
        Apply dialect-specific quoting.

        By default, the incoming value is checked to see if its first character is the back-tick (`). If so, the dialect specific quoting is applied.

        Parameters:
        name - The value to be quoted.
        Returns:
        The quoted (or unmodified, if not starting with back-tick) value.
        See Also:
        openQuote(), closeQuote()
      • canCreateCatalog

        public boolean canCreateCatalog()
        Does this dialect support catalog creation?
        Returns:
        True if the dialect supports catalog creation; false otherwise.
      • getCreateCatalogCommand

        public String[] getCreateCatalogCommand​(String catalogName)
        Get the SQL command used to create the named catalog
        Parameters:
        catalogName - The name of the catalog to be created.
        Returns:
        The creation commands
      • getDropCatalogCommand

        public String[] getDropCatalogCommand​(String catalogName)
        Get the SQL command used to drop the named catalog
        Parameters:
        catalogName - The name of the catalog to be dropped.
        Returns:
        The drop commands
      • canCreateSchema

        public boolean canCreateSchema()
        Does this dialect support schema creation?
        Returns:
        True if the dialect supports schema creation; false otherwise.
      • getCreateSchemaCommand

        public String[] getCreateSchemaCommand​(String schemaName)
        Get the SQL command used to create the named schema
        Parameters:
        schemaName - The name of the schema to be created.
        Returns:
        The creation commands
      • getDropSchemaCommand

        public String[] getDropSchemaCommand​(String schemaName)
        Get the SQL command used to drop the named schema
        Parameters:
        schemaName - The name of the schema to be dropped.
        Returns:
        The drop commands
      • getCurrentSchemaCommand

        public String getCurrentSchemaCommand()
        Get the SQL command used to retrieve the current schema name. Works in conjunction with getSchemaNameResolver(), unless the return from there does not need this information. E.g., a custom impl might make use of the Java 1.7 addition of the Connection.getSchema() method
        Returns:
        The current schema retrieval SQL
      • getSchemaNameResolver

        public SchemaNameResolver getSchemaNameResolver()
        Get the strategy for determining the schema name of a Connection
        Returns:
        The schema name resolver strategy
      • hasAlterTable

        public boolean hasAlterTable()
        Does this dialect support the ALTER TABLE syntax?
        Returns:
        True if we support altering of tables; false otherwise.
      • dropConstraints

        public boolean dropConstraints()
        Do we need to drop constraints before dropping tables in this dialect?
        Returns:
        True if constraints must be dropped prior to dropping the table; false otherwise.
      • qualifyIndexName

        public boolean qualifyIndexName()
        Do we need to qualify index names with the schema name?
        Returns:
        boolean
      • getAddColumnString

        public String getAddColumnString()
        The syntax used to add a column to a table (optional).
        Returns:
        The "add column" fragment.
      • getAddColumnSuffixString

        public String getAddColumnSuffixString()
        The syntax for the suffix used to add a column to a table (optional).
        Returns:
        The suffix "add column" fragment.
      • getDropForeignKeyString

        public String getDropForeignKeyString()
      • getTableTypeString

        public String getTableTypeString()
      • getAddForeignKeyConstraintString

        public String getAddForeignKeyConstraintString​(String constraintName,
                                                       String[] foreignKey,
                                                       String referencedTable,
                                                       String[] primaryKey,
                                                       boolean referencesPrimaryKey)
        The syntax used to add a foreign key constraint to a table.
        Parameters:
        constraintName - The FK constraint name.
        foreignKey - The names of the columns comprising the FK
        referencedTable - The table referenced by the FK
        primaryKey - The explicit columns in the referencedTable referenced by this FK.
        referencesPrimaryKey - if false, constraint should be explicit about which column names the constraint refers to
        Returns:
        the "add FK" fragment
      • getAddForeignKeyConstraintString

        public String getAddForeignKeyConstraintString​(String constraintName,
                                                       String foreignKeyDefinition)
      • getAddPrimaryKeyConstraintString

        public String getAddPrimaryKeyConstraintString​(String constraintName)
        The syntax used to add a primary key constraint to a table.
        Parameters:
        constraintName - The name of the PK constraint.
        Returns:
        The "add PK" fragment
      • hasSelfReferentialForeignKeyBug

        public boolean hasSelfReferentialForeignKeyBug()
        Does the database/driver have bug in deleting rows that refer to other rows being deleted in the same query?
        Returns:
        true if the database/driver has this bug
      • getNullColumnString

        public String getNullColumnString()
        The keyword used to specify a nullable column.
        Returns:
        String
      • getNullColumnString

        public String getNullColumnString​(String columnType)
        The keyword used to specify a nullable column.
        Returns:
        String
      • supportsCommentOn

        public boolean supportsCommentOn()
        Does this dialect/database support commenting on tables, columns, etc?
        Returns:
        true if commenting is supported
      • getTableComment

        public String getTableComment​(String comment)
        Get the comment into a form supported for table definition.
        Parameters:
        comment - The comment to apply
        Returns:
        The comment fragment
      • getColumnComment

        public String getColumnComment​(String comment)
        Get the comment into a form supported for column definition.
        Parameters:
        comment - The comment to apply
        Returns:
        The comment fragment
      • supportsIfExistsBeforeTableName

        public boolean supportsIfExistsBeforeTableName()
        For dropping a table, can the phrase "if exists" be applied before the table name?

        NOTE : Only one or the other (or neither) of this and supportsIfExistsAfterTableName() should return true

        Returns:
        true if the "if exists" can be applied before the table name
      • supportsIfExistsAfterTableName

        public boolean supportsIfExistsAfterTableName()
        For dropping a table, can the phrase "if exists" be applied after the table name?

        NOTE : Only one or the other (or neither) of this and supportsIfExistsBeforeTableName() should return true

        Returns:
        true if the "if exists" can be applied after the table name
      • supportsIfExistsBeforeConstraintName

        public boolean supportsIfExistsBeforeConstraintName()
        For dropping a constraint with an "alter table", can the phrase "if exists" be applied before the constraint name?

        NOTE : Only one or the other (or neither) of this and supportsIfExistsAfterConstraintName() should return true

        Returns:
        true if the "if exists" can be applied before the constraint name
      • supportsIfExistsAfterConstraintName

        public boolean supportsIfExistsAfterConstraintName()
        For dropping a constraint with an "alter table", can the phrase "if exists" be applied after the constraint name?

        NOTE : Only one or the other (or neither) of this and supportsIfExistsBeforeConstraintName() should return true

        Returns:
        true if the "if exists" can be applied after the constraint name
      • supportsIfExistsAfterAlterTable

        public boolean supportsIfExistsAfterAlterTable()
        For an "alter table", can the phrase "if exists" be applied?
        Returns:
        true if the "if exists" can be applied after ALTER TABLE
        Since:
        5.2.11
      • getDropTableString

        public String getDropTableString​(String tableName)
        Generate a DROP TABLE statement
        Parameters:
        tableName - The name of the table to drop
        Returns:
        The DROP TABLE command
      • supportsColumnCheck

        public boolean supportsColumnCheck()
        Does this dialect support column-level check constraints?
        Returns:
        True if column-level CHECK constraints are supported; false otherwise.
      • supportsTableCheck

        public boolean supportsTableCheck()
        Does this dialect support table-level check constraints?
        Returns:
        True if table-level CHECK constraints are supported; false otherwise.
      • supportsCascadeDelete

        public boolean supportsCascadeDelete()
        Does this dialect support cascaded delete on foreign key definitions?
        Returns:
        true indicates that the dialect does support cascaded delete on foreign keys.
      • getCascadeConstraintsString

        public String getCascadeConstraintsString()
        The keyword that specifies that a drop table operation should be cascaded to its constraints, typically " cascade" where the leading space is required, or the empty string if there is no such keyword in this dialect.
        Returns:
        The cascade drop keyword, if any, with a leading space
      • supportsParametersInInsertSelect

        public boolean supportsParametersInInsertSelect()
        Does this dialect support parameters within the SELECT clause of INSERT ... SELECT ... statements?
        Returns:
        True if this is supported; false otherwise.
        Since:
        3.2
      • supportsOrdinalSelectItemReference

        public boolean supportsOrdinalSelectItemReference()
        Does this dialect support references to result variables (i.e, select items) by column positions (1-origin) as defined by the select clause?
        Returns:
        true if result variable references by column positions are supported; false otherwise.
        Since:
        6.0.0
      • getNullOrdering

        public NullOrdering getNullOrdering()
        Returns the ordering of null.
        Since:
        6.0.0
      • supportsNullPrecedence

        public boolean supportsNullPrecedence()
      • isAnsiNullOn

        public boolean isAnsiNullOn()
      • requiresFloatCastingOfIntegerDivision

        public boolean requiresFloatCastingOfIntegerDivision()
        Does this dialect require that integer divisions be wrapped in cast() calls to tell the db parser the expected type.
        Returns:
        True if integer divisions must be cast()ed to float
      • supportsResultSetPositionQueryMethodsOnForwardOnlyCursor

        public boolean supportsResultSetPositionQueryMethodsOnForwardOnlyCursor()
        Does this dialect support asking the result set its positioning information on forward only cursors. Specifically, in the case of scrolling fetches, Hibernate needs to use ResultSet.isAfterLast() and ResultSet.isBeforeFirst(). Certain drivers do not allow access to these methods for forward only cursors.

        NOTE : this is highly driver dependent!

        Returns:
        True if methods like ResultSet.isAfterLast() and ResultSet.isBeforeFirst() are supported for forward only cursors; false otherwise.
        Since:
        3.2
      • supportsCircularCascadeDeleteConstraints

        public boolean supportsCircularCascadeDeleteConstraints()
        Does this dialect support definition of cascade delete constraints which can cause circular chains?
        Returns:
        True if circular cascade delete constraints are supported; false otherwise.
        Since:
        3.2
      • supportsSubselectAsInPredicateLHS

        public boolean supportsSubselectAsInPredicateLHS()
        Are subselects supported as the left-hand-side (LHS) of IN-predicates.

        In other words, is syntax like ... <subquery> IN (1, 2, 3) ... supported?

        Returns:
        True if subselects can appear as the LHS of an in-predicate; false otherwise.
        Since:
        3.2
      • supportsExpectedLobUsagePattern

        public boolean supportsExpectedLobUsagePattern()
        Expected LOB usage pattern is such that I can perform an insert via prepared statement with a parameter binding for a LOB value without crazy casting to JDBC driver implementation-specific classes...

        Part of the trickiness here is the fact that this is largely driver dependent. For example, Oracle (which is notoriously bad with LOB support in their drivers historically) actually does a pretty good job with LOB support as of the 10.2.x versions of their drivers...

        Returns:
        True if normal LOB usage patterns can be used with this driver; false if driver-specific hookiness needs to be applied.
        Since:
        3.2
      • supportsUnboundedLobLocatorMaterialization

        public boolean supportsUnboundedLobLocatorMaterialization()
        Is it supported to materialize a LOB locator outside the transaction in which it was created?

        Again, part of the trickiness here is the fact that this is largely driver dependent.

        NOTE: all database I have tested which supportsExpectedLobUsagePattern() also support the ability to materialize a LOB outside the owning transaction...

        Returns:
        True if unbounded materialization is supported; false otherwise.
        Since:
        3.2
      • supportsSubqueryOnMutatingTable

        public boolean supportsSubqueryOnMutatingTable()
        Does this dialect support referencing the table being mutated in a subquery. The "table being mutated" is the table referenced in an UPDATE or a DELETE query. And so can that table then be referenced in a subquery of said UPDATE/DELETE query.

        For example, would the following two syntaxes be supported:

        • delete from TABLE_A where ID not in ( select ID from TABLE_A )
        • update TABLE_A set NON_ID = 'something' where ID in ( select ID from TABLE_A)
        Returns:
        True if this dialect allows references the mutating table from a subquery.
      • supportsExistsInSelect

        public boolean supportsExistsInSelect()
        Does the dialect support an exists statement in the select clause?
        Returns:
        True if exists checks are allowed in the select clause; false otherwise.
      • doesReadCommittedCauseWritersToBlockReaders

        public boolean doesReadCommittedCauseWritersToBlockReaders()
        For the underlying database, is READ_COMMITTED isolation implemented by forcing readers to wait for write locks to be released?
        Returns:
        True if writers block readers to achieve READ_COMMITTED; false otherwise.
      • doesRepeatableReadCauseReadersToBlockWriters

        public boolean doesRepeatableReadCauseReadersToBlockWriters()
        For the underlying database, is REPEATABLE_READ isolation implemented by forcing writers to wait for read locks to be released?
        Returns:
        True if readers block writers to achieve REPEATABLE_READ; false otherwise.
      • supportsBindAsCallableArgument

        public boolean supportsBindAsCallableArgument()
        Does this dialect support using a JDBC bind parameter as an argument to a function or procedure call?
        Returns:
        Returns true if the database supports accepting bind params as args, false otherwise. The default is true.
      • supportsTupleCounts

        public boolean supportsTupleCounts()
        Does this dialect support `count(a,b)`?
        Returns:
        True if the database supports counting tuples; false otherwise.
      • requiresParensForTupleCounts

        public boolean requiresParensForTupleCounts()
        If supportsTupleCounts() is true, does the Dialect require the tuple to be wrapped with parens?
        Returns:
        boolean
      • supportsTupleDistinctCounts

        public boolean supportsTupleDistinctCounts()
        Does this dialect support `count(distinct a,b)`?
        Returns:
        True if the database supports counting distinct tuples; false otherwise.
      • requiresParensForTupleDistinctCounts

        public boolean requiresParensForTupleDistinctCounts()
        If supportsTupleDistinctCounts() is true, does the Dialect require the tuple to be wrapped with parens?
        Returns:
        boolean
      • getInExpressionCountLimit

        public int getInExpressionCountLimit()
        Return the limit that the underlying database places on the number of elements in an IN predicate. If the database defines no such limits, simply return zero or less-than-zero.
        Returns:
        int The limit, or zero-or-less to indicate no limit.
      • forceLobAsLastValue

        public boolean forceLobAsLastValue()
        HHH-4635 Oracle expects all Lob values to be last in inserts and updates.
        Returns:
        boolean True if Lob values should be last, false if it does not matter.
      • isEmptyStringTreatedAsNull

        public boolean isEmptyStringTreatedAsNull()
        Return whether the dialect considers an empty-string value as null.
        Returns:
        boolean True if an empty string is treated as null, false otherwise.
      • useFollowOnLocking

        public boolean useFollowOnLocking​(String sql,
                                          QueryOptions queryOptions)
        Some dialects have trouble applying pessimistic locking depending upon what other query options are specified (paging, ordering, etc). This method allows these dialects to request that locking be applied by subsequent selects.
        Returns:
        true indicates that the dialect requests that locking be applied by subsequent select; false (the default) indicates that locking should be applied to the main SQL statement..
        Since:
        5.2
      • getUniqueDelegate

        public UniqueDelegate getUniqueDelegate()
        Get the UniqueDelegate supported by this dialect
        Returns:
        The UniqueDelegate
      • getQueryHintString

        public String getQueryHintString​(String query,
                                         List<String> hintList)
        Apply a hint to the query. The entire query is provided, allowing the Dialect full control over the placement and syntax of the hint. By default, ignore the hint and simply return the query.
        Parameters:
        query - The query to which to apply the hint.
        hintList - The hints to apply
        Returns:
        The modified SQL
      • getQueryHintString

        public String getQueryHintString​(String query,
                                         String hints)
        Apply a hint to the query. The entire query is provided, allowing the Dialect full control over the placement and syntax of the hint. By default, ignore the hint and simply return the query.
        Parameters:
        query - The query to which to apply the hint.
        hints - The hints to apply
        Returns:
        The modified SQL
      • defaultScrollMode

        public ScrollMode defaultScrollMode()
        Certain dialects support a subset of ScrollModes. Provide a default to be used by Criteria and Query.
        Returns:
        ScrollMode
      • supportsOffsetInSubquery

        public boolean supportsOffsetInSubquery()
        Does this dialect support offset in subqueries? Ex: select * from Table1 where col1 in (select col1 from Table2 order by col2 limit 1 offset 1)
        Returns:
        boolean
      • supportsOrderByInSubquery

        public boolean supportsOrderByInSubquery()
        Does this dialect support the order by clause in subqueries? Ex: select * from Table1 where col1 in (select col1 from Table2 order by col2 limit 1)
        Returns:
        boolean
      • supportsSubqueryInSelect

        public boolean supportsSubqueryInSelect()
        Does this dialect support subqueries in the select clause? Ex: select col1, (select col2 from Table2 where ..) from Table1
        Returns:
        boolean
      • supportsFetchClause

        public boolean supportsFetchClause​(FetchClauseType type)
        Does this dialect support the given fetch clause type.
        Parameters:
        type - The fetch clause type
        Returns:
        true if the underlying database supports the given fetch clause type, false otherwise. The default is false.
      • supportsWindowFunctions

        public boolean supportsWindowFunctions()
        Does this dialect support window functions like `row_number() over (..)`
        Returns:
        true if the underlying database supports window functions, false otherwise. The default is false.
      • getNameQualifierSupport

        public NameQualifierSupport getNameQualifierSupport()
        By default interpret this based on DatabaseMetaData.
        Returns:
        The NameQualifierSupport.
      • isJdbcLogWarningsEnabledByDefault

        public boolean isJdbcLogWarningsEnabledByDefault()
        Does the fetching JDBC statement warning for logging is enabled by default
        Returns:
        boolean
        Since:
        5.1
      • augmentRecognizedTableTypes

        public void augmentRecognizedTableTypes​(List<String> tableTypesList)
      • supportsPartitionBy

        public boolean supportsPartitionBy()
        Does the underlying database support partition by
        Returns:
        boolean
        Since:
        5.2
      • supportsNamedParameters

        public boolean supportsNamedParameters​(DatabaseMetaData databaseMetaData)
                                        throws SQLException
        Override the DatabaseMetaData#supportsNamedParameters()
        Returns:
        boolean
        Throws:
        SQLException - Accessing the DatabaseMetaData can throw it. Just re-throw and Hibernate will handle.
      • getPreferredSqlTypeCodeForBoolean

        public int getPreferredSqlTypeCodeForBoolean()
        The JDBC type code to use for mapping properties of Java type boolean.

        Usually Types.BOOLEAN or Types.BIT.

        Returns:
        one of the type codes defined by Types.
      • supportsNonQueryWithCTE

        public boolean supportsNonQueryWithCTE()
        Does this dialect/database support non-query statements (e.g. INSERT, UPDATE, DELETE) with CTE (Common Table Expressions)?
        Returns:
        true if non-query statements are supported with CTE
      • supportsValuesList

        public boolean supportsValuesList()
        Does this dialect/database support VALUES list (e.g. VALUES (1), (2), (3) )
        Returns:
        true if VALUES list are supported
      • supportsValuesListForInsert

        public boolean supportsValuesListForInsert()
        Does this dialect/database support VALUES list (e.g. VALUES (1), (2), (3) ) for insert statements.
        Returns:
        true if VALUES list are supported for insert statements
      • supportsSkipLocked

        public boolean supportsSkipLocked()
        Does this dialect/database support SKIP_LOCKED timeout.
        Returns:
        true if SKIP_LOCKED is supported
      • supportsNoWait

        public boolean supportsNoWait()
        Does this dialect/database support NO_WAIT timeout.
        Returns:
        true if NO_WAIT is supported
      • supportsWait

        public boolean supportsWait()
        Does this dialect/database support WAIT timeout.
        Returns:
        true if WAIT is supported
      • inlineLiteral

        public String inlineLiteral​(String literal)
        Inline String literal.
        Returns:
        escaped String
      • appendLiteral

        public void appendLiteral​(SqlAppender appender,
                                  String literal)
      • addSqlHintOrComment

        public String addSqlHintOrComment​(String sql,
                                          QueryOptions queryOptions,
                                          boolean commentsEnabled)
        Modify the SQL, adding hints or comments, if necessary
      • escapeComment

        public static String escapeComment​(String comment)
      • getDefaultLobLength

        public long getDefaultLobLength()
      • getDefaultDecimalPrecision

        public int getDefaultDecimalPrecision()
        This is the default precision for a generated column mapped to a BigInteger or BigDecimal.

        Usually returns the maximum precision of the database, except when there is no such maximum precision, or the maximum precision is very high.

        Returns:
        the default precision, in decimal digits
      • getDefaultTimestampPrecision

        public int getDefaultTimestampPrecision()
        This is the default precision for a generated column mapped to a Timestamp or LocalDateTime.

        Usually 6 (microseconds) or 3 (milliseconds).

        Returns:
        the default precision, in decimal digits, of the fractional seconds field
      • getFloatPrecision

        public int getFloatPrecision()
        This is the default precision for a generated column mapped to a Java Float or float. That is, a value representing "single precision".

        Usually 24 binary digits, at least for databases with a conventional interpretation of the ANSI SQL specification.

        Returns:
        a value representing "single precision", usually in binary digits, but sometimes in decimal digits
      • getDoublePrecision

        public int getDoublePrecision()
        This is the default precision for a generated column mapped to a Java Double or double. That is, a value representing "double precision".

        Usually 53 binary digits, at least for databases with a conventional interpretation of the ANSI SQL specification.

        Returns:
        a value representing "double precision", usually in binary digits, but sometimes in decimal digits
      • getFractionalSecondPrecisionInNanos

        public long getFractionalSecondPrecisionInNanos()
        The "native" precision for arithmetic with datetimes and day-to-second durations. Datetime differences will be calculated with this precision except when a precision is explicitly specified as a TemporalUnit.

        Usually 1 (nanoseconds), 1_000 (microseconds), or 1_000_000 (milliseconds).

        Returns:
        the precision, specified as a quantity of nanoseconds
        See Also:
        TemporalUnit.NATIVE
      • supportsBitType

        public boolean supportsBitType()
        Does this dialect have a true SQL BIT type with just two values (0 and 1) or, even better, a proper SQL BOOLEAN type, or does Types.BIT get mapped to a numeric type with more than two values?
        Returns:
        true if there is a BIT or BOOLEAN type
      • appendBinaryLiteral

        public void appendBinaryLiteral​(SqlAppender appender,
                                        byte[] bytes)
      • appendDatetimeFormat

        public void appendDatetimeFormat​(SqlAppender appender,
                                         String format)
        Translate the given datetime format string from the pattern language defined by Java's DateTimeFormatter to whatever pattern language is understood by the native datetime formatting function for this database (often the to_char() function).

        Since it's never possible to translate all of the pattern letter sequences understood by DateTimeFormatter, only the following subset of pattern letters is accepted by Hibernate:

        • G: era
        • y: year of era
        • Y: year of week-based year
        • M: month of year
        • w: week of week-based year (ISO week number)
        • W: week of month
        • E: day of week (name)
        • e: day of week (number)
        • d: day of month
        • D: day of year
        • a: AM/PM
        • H: hour of day (24 hour time)
        • h: hour of AM/PM (12 hour time)
        • m: minutes
        • s: seconds
        • z,Z,x: timezone offset
        In addition, punctuation characters and single-quoted literal strings are accepted.
      • appendDateTimeLiteral

        public void appendDateTimeLiteral​(SqlAppender appender,
                                          TemporalAccessor temporalAccessor,
                                          jakarta.persistence.TemporalType precision,
                                          TimeZone jdbcTimeZone)
      • appendDateTimeLiteral

        public void appendDateTimeLiteral​(SqlAppender appender,
                                          Date date,
                                          jakarta.persistence.TemporalType precision,
                                          TimeZone jdbcTimeZone)
      • appendDateTimeLiteral

        public void appendDateTimeLiteral​(SqlAppender appender,
                                          Calendar calendar,
                                          jakarta.persistence.TemporalType precision,
                                          TimeZone jdbcTimeZone)
      • appendIntervalLiteral

        public void appendIntervalLiteral​(SqlAppender appender,
                                          Duration literal)
      • supportsTemporalLiteralOffset

        public boolean supportsTemporalLiteralOffset()
        Whether the Dialect supports timezone offset in temporal literals.
      • getCreateTemporaryTableColumnAnnotation

        public String getCreateTemporaryTableColumnAnnotation​(int sqlTypeCode)
        Annotation to be appended to the end of each COLUMN clause for temporary tables.
        Parameters:
        sqlTypeCode - The SQL type code
        Returns:
        The annotation to be appended (e.g. "COLLATE DATABASE_DEFAULT" in SQLServer SQL)