public class MySQLDialect extends Dialect
Dialect.SizeStrategy, Dialect.SizeStrategyImplCLOSED_QUOTE, DEFAULT_BATCH_SIZE, LEGACY_LOB_MERGE_STRATEGY, NEW_LOCATOR_LOB_MERGE_STRATEGY, NO_BATCH, QUOTE, STANDARD_DEFAULT_BATCH_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGY, TWO_SINGLE_QUOTES_REPLACEMENT| Constructor and Description |
|---|
MySQLDialect() |
MySQLDialect(DialectResolutionInfo info) |
MySQLDialect(int version) |
MySQLDialect(int version,
int characterSetBytesPerCharacter) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
areStringComparisonsCaseInsensitive()
Are string comparisons implicitly case insensitive.
|
IdentifierHelper |
buildIdentifierHelper(IdentifierHelperBuilder builder,
DatabaseMetaData dbMetaData)
Build the IdentifierHelper indicated by this Dialect for handling identifier conversions.
|
SQLExceptionConversionDelegate |
buildSQLExceptionConversionDelegate()
Build an instance of a
SQLExceptionConversionDelegate for
interpreting dialect-specific error or SQLState codes. |
boolean |
canCreateCatalog()
Does this dialect support catalog creation?
|
boolean |
canCreateSchema()
Does this dialect support schema creation?
|
char |
closeQuote()
The character specific to this dialect used to close a quoted identifier.
|
String |
currentTimestamp()
MySQL 5.7 precision defaults to seconds, but microseconds is better
|
static Replacer |
datetimeFormat(String format) |
boolean |
dropConstraints()
Do we need to drop constraints before dropping tables in this dialect?
|
protected String |
escapeLiteral(String literal)
Escape String literal.
|
String |
extractPattern(TemporalUnit unit)
MySQL supports a limited list of temporal fields in the
extract() function, but we can emulate some of them by
using the appropriate named functions instead of
extract().
|
String |
getAddForeignKeyConstraintString(String constraintName,
String[] foreignKey,
String referencedTable,
String[] primaryKey,
boolean referencesPrimaryKey)
The syntax used to add a foreign key constraint to a table.
|
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. |
protected static int |
getCharacterSetBytesPerCharacter(DatabaseMetaData databaseMetaData) |
String |
getColumnComment(String comment)
Get the comment into a form supported for column definition.
|
String[] |
getCreateCatalogCommand(String catalogName)
Get the SQL command used to create the named catalog
|
String[] |
getCreateSchemaCommand(String schemaName)
Get the SQL command used to create the named schema
|
String |
getCurrentTimestampSelectString()
Retrieve the command used to retrieve the current timestamp from the
database.
|
long |
getDefaultLobLength() |
protected MySQLStorageEngine |
getDefaultMySQLStorageEngine() |
String[] |
getDropCatalogCommand(String catalogName)
Get the SQL command used to drop the named catalog
|
String |
getDropForeignKeyString() |
String[] |
getDropSchemaCommand(String schemaName)
Get the SQL command used to drop the named schema
|
SqmMultiTableMutationStrategy |
getFallbackSqmMutationStrategy(EntityMappingType rootEntityDescriptor,
RuntimeModelCreationContext runtimeModelCreationContext) |
int |
getFloatPrecision()
This is the default precision for a generated
column mapped to a Java
Float or
float. |
String |
getForUpdateNowaitString()
Retrieves the FOR UPDATE NOWAIT syntax specific to this dialect.
|
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.
|
String |
getForUpdateSkipLockedString()
Retrieves the FOR UPDATE SKIP LOCKED syntax specific to this dialect.
|
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.
|
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.
|
long |
getFractionalSecondPrecisionInNanos()
microsecond is the smallest unit for
timestampadd() and timestampdiff(),
and the highest precision for a timestamp. |
String |
getFromDual()
Some databases require a bit of syntactic noise when
there are no tables in the from clause.
|
GroupBySummarizationRenderingStrategy |
getGroupBySummarizationRenderingStrategy()
The strategy to use for rendering summarizations in the GROUP BY clause.
|
IdentityColumnSupport |
getIdentityColumnSupport()
Get the appropriate
IdentityColumnSupport |
LimitHandler |
getLimitHandler()
Returns a
LimitHandler that implements support for
Query.setMaxResults(int) and
Query.setFirstResult(int) for
this dialect. |
protected int |
getMaxVarcharLen() |
int |
getMySQLVersion() |
String |
getNotExpression(String expression)
Negate an expression
|
String |
getNullColumnString(String columnType)
The keyword used to specify a nullable column.
|
NullOrdering |
getNullOrdering()
Returns the ordering of null.
|
int |
getPreferredSqlTypeCodeForBoolean()
The JDBC
type code to use for mapping
properties of Java type boolean. |
String |
getQueryHintString(String query,
String hints)
Apply a hint to the query.
|
String |
getReadLockString(int timeout)
Get the string to append to SELECT statements to acquire READ locks
for this dialect.
|
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.
|
ResultSet |
getResultSet(CallableStatement ps)
Given a callable statement previously processed by
Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int),
extract the ResultSet from the OUT parameter. |
String |
getSelectGUIDString()
Get the command used to select a GUID from the underlying database.
|
SequenceSupport |
getSequenceSupport()
No support for sequences.
|
Dialect.SizeStrategy |
getSizeStrategy() |
SqlAstTranslatorFactory |
getSqlAstTranslatorFactory()
Return an SqlAstTranslatorFactory specific for the Dialect.
|
String |
getTableComment(String comment)
Get the comment into a form supported for table definition.
|
String |
getTableTypeString() |
UniqueDelegate |
getUniqueDelegate()
Get the UniqueDelegate supported by this dialect
|
int |
getVersion() |
ViolatedConstraintNameExtractor |
getViolatedConstraintNameExtractor() |
String |
getWriteLockString(int timeout)
Get the string to append to SELECT statements to acquire WRITE locks
for this dialect.
|
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.
|
RowLockStrategy |
getWriteRowLockStrategy()
The row lock strategy to use for write locks.
|
boolean |
hasSelfReferentialForeignKeyBug()
Does the database/driver have bug in deleting rows that refer to other rows being deleted in the same query?
|
void |
initializeFunctionRegistry(QueryEngine queryEngine)
Initialize the given registry with any dialect-specific functions.
|
boolean |
isCurrentTimestampSelectStringCallable()
Should the value returned by
Dialect.getCurrentTimestampSelectString()
be treated as callable. |
boolean |
isJdbcLogWarningsEnabledByDefault()
Does the fetching JDBC statement warning for logging is enabled by default
|
char |
openQuote()
The character specific to this dialect used to begin a quoted identifier.
|
boolean |
qualifyIndexName()
Do we need to qualify index names with the schema name?
|
int |
registerResultSetOutParameter(CallableStatement statement,
int col)
Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of
returning
ResultSet *by position*. |
String |
renderOrderByElement(String expression,
String collation,
String order,
NullPrecedence nulls)
Renders an ordering fragment
|
JdbcTypeDescriptor |
resolveSqlTypeDescriptor(int jdbcTypeCode,
int precision,
int scale,
JdbcTypeDescriptorRegistry jdbcTypeDescriptorRegistry) |
boolean |
supportsCascadeDelete()
Does this dialect support cascaded delete on foreign key definitions?
|
boolean |
supportsColumnCheck()
Does this dialect support column-level check constraints?
|
boolean |
supportsCurrentTimestampSelection()
Does this dialect support a way to retrieve the database's current
timestamp value?
|
boolean |
supportsEmptyInList()
Does this dialect support empty IN lists?
For example, is [where XYZ in ()] a supported construct?
|
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
Dialect.supportsIfExistsAfterTableName() should return true |
boolean |
supportsLobValueChangePropagation()
Does the dialect support propagating changes to LOB
values back to the database? Talking about mutating the
internal value of the locator as opposed to supplying a new
locator instance...
|
boolean |
supportsLockTimeouts()
Informational metadata about whether this dialect is known to support
specifying timeouts for requested lock acquisitions.
|
boolean |
supportsNoWait()
Does this dialect/database support NO_WAIT timeout.
|
boolean |
supportsNullPrecedence() |
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)
|
boolean |
supportsRowValueConstructorSyntax()
Is this dialect known to support what ANSI-SQL terms "row value
constructor" syntax; sometimes called tuple syntax.
|
boolean |
supportsRowValueConstructorSyntaxInInList()
If the dialect supports
row values,
does it offer such support in IN lists as well?
For example, "... |
boolean |
supportsRowValueConstructorSyntaxInSet()
Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax,
sometimes called tuple syntax, in the SET clause;
Basically, does it support syntax like
"...
|
boolean |
supportsSelectAliasInGroupByClause() |
boolean |
supportsSkipLocked()
Does this dialect/database support SKIP_LOCKED timeout.
|
boolean |
supportsSubqueryOnMutatingTable()
Does this dialect support referencing the table being mutated in
a subquery.
|
boolean |
supportsUnionAll()
Does this dialect support UNION ALL.
|
boolean |
supportsWait()
Does this dialect/database support WAIT timeout.
|
boolean |
supportsWindowFunctions()
Does this dialect support window functions like `row_number() over (..)`
|
String |
timestampaddPattern(TemporalUnit unit,
TemporalType temporalType)
Obtain a pattern for the SQL equivalent to a
timestampadd() function call. |
String |
timestampdiffPattern(TemporalUnit unit,
TemporalType fromTemporalType,
TemporalType toTemporalType)
Obtain a pattern for the SQL equivalent to a
timestampdiff() function call. |
String |
translateDatetimeFormat(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). |
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, augmentRecognizedTableTypes, binaryToDecimalPrecision, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildSQLExceptionConverter, castPattern, contributeTypes, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, currentDate, currentLocalTime, currentLocalTimestamp, currentTime, currentTimestampWithTimeZone, defaultScrollMode, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, equivalentTypes, escapeComment, forceLimitUsage, forceLobAsLastValue, formatAsTimestamp, formatAsTimestamp, formatAsTimestamp, formatBinaryLiteral, formatDateTimeLiteral, formatDateTimeLiteral, formatDateTimeLiteral, forUpdateOfColumns, getAddColumnString, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getBooleanCheckCondition, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getColumnAliasExtractor, getCreateMultisetTableString, getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCrossJoinSeparator, getCurrentSchemaCommand, getCurrentTimestampSQLFunctionName, getDefaultBatchLoadSizingStrategy, getDefaultDecimalPrecision, getDefaultProperties, getDefaultTimestampPrecision, getDialect, getDialect, getDoublePrecision, getDropSequenceString, getDropSequenceStrings, getDropTableString, getEnumCheckCondition, getForeignKeyExporter, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getGroupByConstantRenderingStrategy, getHibernateTypeName, getHibernateTypeName, getHqlTranslator, getIndexExporter, getInExpressionCountLimit, getKeywords, getLimitString, getLimitString, getLobMergeStrategy, getLockingStrategy, getLockRowIdentifier, getLowercaseFunction, getMaxAliasLength, getNameQualifierSupport, getNationalizationSupport, getNativeIdentifierGeneratorClass, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNullColumnString, getQueryHintString, getQuerySequencesString, getRawTypeName, getRawTypeName, getReadRowLockStrategy, getResultSet, getResultSet, getSchemaNameResolver, getSelectClauseNullString, getSelectSequenceNextValString, getSequenceExporter, getSequenceInformationExtractor, getSequenceNextValString, getSequenceNextValString, getSqlTypeDescriptorOverride, getSqmTranslatorFactory, getTableAliasSeparator, getTableExporter, getTypeName, getTypeName, getTypeName, getTypeName, getUniqueKeyExporter, hasAlterTable, inlineLiteral, isEmptyStringTreatedAsNull, isLockTimeoutParameterized, isTypeNameRegistered, prependComment, quote, registerColumnType, registerColumnType, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, remapSqlTypeDescriptor, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, requiresFloatCastingOfIntegerDivision, requiresParensForTupleDistinctCounts, supportsBindAsCallableArgument, supportsBitType, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsCommentOn, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsFetchClause, supportsFractionalTimestampArithmetic, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsJdbcConnectionLobCreation, supportsLimit, supportsLimitOffset, supportsNamedParameters, supportsNationalizedTypes, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNotNullUnique, supportsOrderByInSubquery, supportsOrdinalSelectItemReference, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPartitionBy, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntaxInInSubquery, supportsRowValueConstructorSyntaxInQuantifiedPredicates, supportsSelectQueryWithoutFromClause, supportsSequences, supportsSubqueryInSelect, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTemporalLiteralOffset, supportsTemporaryTables, supportsTimezoneTypes, supportsTruncateWithCast, supportsTupleCounts, supportsTupleDistinctCounts, supportsTuplesInSubqueries, supportsUnboundedLobLocatorMaterialization, supportsUnionInSubquery, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, supportsValuesListForInsert, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, translateDurationField, translateExtractField, trimPattern, useFollowOnLocking, useInputStreamToInsertBlob, useMaxForLimit, wrapDateLiteral, wrapTimeLiteral, wrapTimestampLiteralpublic MySQLDialect(DialectResolutionInfo info)
public MySQLDialect()
public MySQLDialect(int version)
public MySQLDialect(int version,
int characterSetBytesPerCharacter)
protected static int getCharacterSetBytesPerCharacter(DatabaseMetaData databaseMetaData)
protected int getMaxVarcharLen()
public String getNullColumnString(String columnType)
DialectgetNullColumnString in class Dialectpublic int getVersion()
getVersion in class Dialectpublic int getMySQLVersion()
public Dialect.SizeStrategy getSizeStrategy()
getSizeStrategy in class Dialectpublic long getDefaultLobLength()
getDefaultLobLength in class Dialectpublic JdbcTypeDescriptor resolveSqlTypeDescriptor(int jdbcTypeCode, int precision, int scale, JdbcTypeDescriptorRegistry jdbcTypeDescriptorRegistry)
resolveSqlTypeDescriptor in class Dialectpublic int getPreferredSqlTypeCodeForBoolean()
Dialecttype code to use for mapping
properties of Java type boolean.
Usually Types.BOOLEAN or Types.BIT.
getPreferredSqlTypeCodeForBoolean in class DialectTypes.public void initializeFunctionRegistry(QueryEngine queryEngine)
DialectinitializeFunctionRegistry in class Dialectpublic SqlAstTranslatorFactory getSqlAstTranslatorFactory()
Dialectnull
to use Hibernate's standard translator.getSqlAstTranslatorFactory in class DialectStandardSqlAstTranslatorFactory,
JdbcEnvironment.getSqlAstTranslatorFactory()public int getFloatPrecision()
DialectFloat 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.
getFloatPrecision in class Dialectpublic String currentTimestamp()
currentTimestamp in class Dialectpublic long getFractionalSecondPrecisionInNanos()
microsecond is the smallest unit for
timestampadd() and timestampdiff(),
and the highest precision for a timestamp.getFractionalSecondPrecisionInNanos in class DialectTemporalUnit.NATIVEpublic String extractPattern(TemporalUnit unit)
TemporalUnit.DAY_OF_YEAR,
TemporalUnit.DAY_OF_MONTH,
TemporalUnit.DAY_OF_YEAR.
In addition, the field TemporalUnit.SECOND is
redefined to include microseconds.extractPattern in class Dialectunit - the first argumentpublic String timestampaddPattern(TemporalUnit unit, TemporalType temporalType)
Dialecttimestampadd() function call. The resulting
pattern must contain ?1, ?2, and ?3 placeholders
for the arguments.timestampaddPattern in class Dialectunit - the first argumenttemporalType - true if the third argument is apublic String timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType)
Dialecttimestampdiff() function call. The resulting
pattern must contain ?1, ?2, and ?3 placeholders
for the arguments.timestampdiffPattern in class Dialectunit - the first argumentfromTemporalType - true if the first argument is
a timestamp, false if a datetoTemporalType - true if the second argument ispublic boolean supportsRowValueConstructorSyntaxInInList()
Dialectrow values,
does it offer such support in IN lists as well?
For example, "... where (FIRST_NAME, LAST_NAME) IN ( (?, ?), (?, ?) ) ..."supportsRowValueConstructorSyntaxInInList in class Dialectpublic boolean supportsUnionAll()
DialectsupportsUnionAll in class Dialectpublic boolean supportsSelectAliasInGroupByClause()
supportsSelectAliasInGroupByClause in class Dialectpublic boolean supportsColumnCheck()
DialectsupportsColumnCheck in class Dialectpublic String getQueryHintString(String query, String hints)
DialectgetQueryHintString in class Dialectquery - The query to which to apply the hint.hints - The hints to applypublic SequenceSupport getSequenceSupport()
getSequenceSupport in class Dialectpublic ViolatedConstraintNameExtractor getViolatedConstraintNameExtractor()
getViolatedConstraintNameExtractor in interface ConversionContextgetViolatedConstraintNameExtractor in class Dialectpublic boolean qualifyIndexName()
DialectqualifyIndexName in class Dialectpublic String getAddForeignKeyConstraintString(String constraintName, String[] foreignKey, String referencedTable, String[] primaryKey, boolean referencesPrimaryKey)
DialectgetAddForeignKeyConstraintString in class DialectconstraintName - The FK constraint name.foreignKey - The names of the columns comprising the FKreferencedTable - The table referenced by the FKprimaryKey - The explicit columns in the referencedTable referenced
by this FK.referencesPrimaryKey - if false, constraint should be
explicit about which column names the constraint refers topublic String getDropForeignKeyString()
getDropForeignKeyString in class Dialectpublic LimitHandler getLimitHandler()
DialectLimitHandler that implements support for
Query.setMaxResults(int) and
Query.setFirstResult(int) for
this dialect.getLimitHandler in class Dialectpublic String getFromDual()
DialectgetFromDual in class Dialectfrom dual.public char closeQuote()
DialectcloseQuote in class Dialectpublic char openQuote()
Dialectpublic boolean canCreateCatalog()
DialectcanCreateCatalog in class Dialectpublic String[] getCreateCatalogCommand(String catalogName)
DialectgetCreateCatalogCommand in class DialectcatalogName - The name of the catalog to be created.public String[] getDropCatalogCommand(String catalogName)
DialectgetDropCatalogCommand in class DialectcatalogName - The name of the catalog to be dropped.public boolean canCreateSchema()
DialectcanCreateSchema in class Dialectpublic String[] getCreateSchemaCommand(String schemaName)
DialectgetCreateSchemaCommand in class DialectschemaName - The name of the schema to be created.public String[] getDropSchemaCommand(String schemaName)
DialectgetDropSchemaCommand in class DialectschemaName - The name of the schema to be dropped.public boolean supportsIfExistsBeforeTableName()
DialectDialect.supportsIfExistsAfterTableName() should return truesupportsIfExistsBeforeTableName in class Dialecttrue if the "if exists" can be applied before the table namepublic String getSelectGUIDString()
DialectgetSelectGUIDString in class Dialectpublic String getTableComment(String comment)
DialectgetTableComment in class Dialectcomment - The comment to applypublic String getColumnComment(String comment)
DialectgetColumnComment in class Dialectcomment - The comment to applypublic NullOrdering getNullOrdering()
DialectgetNullOrdering in class Dialectpublic SqmMultiTableMutationStrategy getFallbackSqmMutationStrategy(EntityMappingType rootEntityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext)
getFallbackSqmMutationStrategy in class Dialectpublic String getCastTypeName(SqlExpressable type, Long length, Integer precision, Integer scale)
DialectSqlExpressable
SQL type.getCastTypeName in class Dialectpublic boolean supportsCurrentTimestampSelection()
DialectsupportsCurrentTimestampSelection in class Dialectpublic boolean isCurrentTimestampSelectStringCallable()
DialectDialect.getCurrentTimestampSelectString()
be treated as callable. Typically this indicates that JDBC escape
syntax is being used...isCurrentTimestampSelectStringCallable in class DialectDialect.getCurrentTimestampSelectString() return
is callable; false otherwise.public String getCurrentTimestampSelectString()
DialectgetCurrentTimestampSelectString in class Dialectpublic int registerResultSetOutParameter(CallableStatement statement, int col) throws SQLException
DialectResultSet *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.registerResultSetOutParameter in class Dialectstatement - The callable statement.col - The bind position at which to register the output param.SQLException - Indicates problems registering the param.public ResultSet getResultSet(CallableStatement ps) throws SQLException
DialectDialect.registerResultSetOutParameter(java.sql.CallableStatement, int),
extract the ResultSet from the OUT parameter.getResultSet in class Dialectps - The callable statement.SQLException - Indicates problems extracting the result set.public UniqueDelegate getUniqueDelegate()
DialectgetUniqueDelegate in class Dialectpublic boolean supportsRowValueConstructorSyntax()
DialectsupportsRowValueConstructorSyntax in class Dialectpublic boolean supportsNullPrecedence()
supportsNullPrecedence in class Dialectpublic boolean supportsRowValueConstructorSyntaxInSet()
DialectsupportsRowValueConstructorSyntaxInSet in class Dialectpublic String renderOrderByElement(String expression, String collation, String order, NullPrecedence nulls)
DialectrenderOrderByElement in class Dialectexpression - The SQL order expression. In case of @OrderBy annotation user receives property placeholder
(e.g. attribute name enclosed in '{' and '}' signs).collation - Collation string in format collate IDENTIFIER, or null
if expression has not been explicitly specified.order - Order direction. Possible values: asc, desc, or null
if expression has not been explicitly specified.nulls - Nulls precedence. Default value: NullPrecedence.NONE.ORDER BY clause.public boolean supportsEmptyInList()
DialectsupportsEmptyInList in class Dialectpublic boolean areStringComparisonsCaseInsensitive()
DialectareStringComparisonsCaseInsensitive in class Dialectpublic boolean supportsLobValueChangePropagation()
DialectBlob.setBinaryStream(long),
Blob.setBytes(long, byte[]),
Blob.setBytes(long, byte[], int, int),
or Blob.truncate(long).
For CLOBs, the internal value might be changed by:
Clob.setAsciiStream(long),
Clob.setCharacterStream(long),
Clob.setString(long, String),
Clob.setString(long, String, int, int),
or Clob.truncate(long).
NOTE : I do not know the correct answer currently for
databases which (1) are not part of the cruise control process
or (2) do not Dialect.supportsExpectedLobUsagePattern().supportsLobValueChangePropagation in class Dialectpublic boolean supportsSubqueryOnMutatingTable()
DialectsupportsSubqueryOnMutatingTable in class Dialectpublic boolean supportsLockTimeouts()
DialectsupportsLockTimeouts in class Dialectpublic SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate()
DialectSQLExceptionConversionDelegate for
interpreting dialect-specific error or SQLState codes.
When Dialect.buildSQLExceptionConverter() returns null, the default
SQLExceptionConverter is used to interpret SQLState and
error 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:
buildSQLExceptionConversionDelegate in class Dialectpublic IdentifierHelper buildIdentifierHelper(IdentifierHelperBuilder builder, DatabaseMetaData dbMetaData) throws SQLException
Dialectnull is allowed and indicates that Hibernate should fallback to building a
"standard" helper. In the fallback path, any changes made to the IdentifierHelperBuilder
during this call will still be incorporated into the built IdentifierHelper.
The incoming builder will have the following set:IdentifierHelperBuilder.isGloballyQuoteIdentifiers()IdentifierHelperBuilder.getUnquotedCaseStrategy() - initialized to UPPERIdentifierHelperBuilder.getQuotedCaseStrategy() - initialized to MIXEDIdentifierHelperBuilder.applyIdentifierCasing(DatabaseMetaData)
IdentifierHelperBuilder.applyReservedWords(DatabaseMetaData)
AnsiSqlKeywords.sql2003() as reserved wordsbuildIdentifierHelper in class Dialectbuilder - A semi-configured IdentifierHelper builder.dbMetaData - Access to the metadata returned from the driver if needed and if available. WARNING: may be nullnull to indicate Hibernate should use its fallback pathSQLException - Accessing the DatabaseMetaData can throw it. Just re-throw and Hibernate will handle.Dialect.getNameQualifierSupport()public String getNotExpression(String expression)
DialectgetNotExpression in class Dialectexpression - The expression to negatepublic IdentityColumnSupport getIdentityColumnSupport()
DialectIdentityColumnSupportgetIdentityColumnSupport in class Dialectpublic boolean isJdbcLogWarningsEnabledByDefault()
DialectisJdbcLogWarningsEnabledByDefault in class Dialectpublic boolean supportsCascadeDelete()
DialectsupportsCascadeDelete in class Dialecttrue indicates that the dialect does support cascaded delete on foreign keys.public String getTableTypeString()
getTableTypeString in class Dialectpublic boolean hasSelfReferentialForeignKeyBug()
DialecthasSelfReferentialForeignKeyBug in class Dialecttrue if the database/driver has this bugpublic boolean dropConstraints()
DialectdropConstraints in class Dialectprotected MySQLStorageEngine getDefaultMySQLStorageEngine()
protected String escapeLiteral(String literal)
DialectescapeLiteral in class Dialectpublic String translateDatetimeFormat(String format)
DialectDateTimeFormatter 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:
translateDatetimeFormat in class Dialectpublic String getWriteLockString(int timeout)
DialectgetWriteLockString in class Dialecttimeout - in milliseconds, -1 for indefinite wait and 0 for no wait.public String getWriteLockString(String aliases, int timeout)
DialectgetWriteLockString in class Dialectaliases - The columns to be read locked.timeout - in milliseconds, -1 for indefinite wait and 0 for no wait.public String getReadLockString(int timeout)
DialectgetReadLockString in class Dialecttimeout - in milliseconds, -1 for indefinite wait and 0 for no wait.public String getReadLockString(String aliases, int timeout)
DialectgetReadLockString in class Dialectaliases - The columns to be read locked.timeout - in milliseconds, -1 for indefinite wait and 0 for no wait.public String getForUpdateSkipLockedString()
DialectgetForUpdateSkipLockedString in class Dialectpublic String getForUpdateSkipLockedString(String aliases)
DialectgetForUpdateSkipLockedString in class Dialectaliases - The columns to be write locked.public String getForUpdateNowaitString()
DialectgetForUpdateNowaitString in class Dialectpublic String getForUpdateNowaitString(String aliases)
DialectgetForUpdateNowaitString in class Dialectaliases - The columns to be write locked.public String getForUpdateString(String aliases)
DialectgetForUpdateString in class Dialectaliases - The columns to be write locked.public boolean supportsOffsetInSubquery()
DialectsupportsOffsetInSubquery in class Dialectpublic boolean supportsWindowFunctions()
DialectsupportsWindowFunctions in class Dialecttrue if the underlying database supports window functions,
false otherwise. The default is false.public boolean supportsSkipLocked()
DialectsupportsSkipLocked in class Dialecttrue if SKIP_LOCKED is supportedpublic boolean supportsNoWait()
DialectsupportsNoWait in class Dialecttrue if NO_WAIT is supportedpublic boolean supportsWait()
DialectsupportsWait in class Dialecttrue if WAIT is supportedpublic RowLockStrategy getWriteRowLockStrategy()
DialectgetWriteRowLockStrategy in class Dialectpublic GroupBySummarizationRenderingStrategy getGroupBySummarizationRenderingStrategy()
DialectgetGroupBySummarizationRenderingStrategy in class DialectCopyright © 2001-2021 Red Hat, Inc. All Rights Reserved.