public class MySQLDialect extends Dialect
Dialect.SizeStrategy, Dialect.SizeStrategyImpl
CLOSED_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, wrapTimestampLiteral
public 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)
Dialect
getNullColumnString
in class Dialect
public int getVersion()
getVersion
in class Dialect
public int getMySQLVersion()
public Dialect.SizeStrategy getSizeStrategy()
getSizeStrategy
in class Dialect
public long getDefaultLobLength()
getDefaultLobLength
in class Dialect
public JdbcTypeDescriptor resolveSqlTypeDescriptor(int jdbcTypeCode, int precision, int scale, JdbcTypeDescriptorRegistry jdbcTypeDescriptorRegistry)
resolveSqlTypeDescriptor
in class Dialect
public int getPreferredSqlTypeCodeForBoolean()
Dialect
type code
to use for mapping
properties of Java type boolean
.
Usually Types.BOOLEAN
or Types.BIT
.
getPreferredSqlTypeCodeForBoolean
in class Dialect
Types
.public void initializeFunctionRegistry(QueryEngine queryEngine)
Dialect
initializeFunctionRegistry
in class Dialect
public SqlAstTranslatorFactory getSqlAstTranslatorFactory()
Dialect
null
to use Hibernate's standard translator.getSqlAstTranslatorFactory
in class Dialect
StandardSqlAstTranslatorFactory
,
JdbcEnvironment.getSqlAstTranslatorFactory()
public int getFloatPrecision()
Dialect
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.
getFloatPrecision
in class Dialect
public String currentTimestamp()
currentTimestamp
in class Dialect
public long getFractionalSecondPrecisionInNanos()
microsecond
is the smallest unit for
timestampadd()
and timestampdiff()
,
and the highest precision for a timestamp
.getFractionalSecondPrecisionInNanos
in class Dialect
TemporalUnit.NATIVE
public 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 Dialect
unit
- the first argumentpublic String timestampaddPattern(TemporalUnit unit, TemporalType temporalType)
Dialect
timestampadd()
function call. The resulting
pattern must contain ?1, ?2, and ?3 placeholders
for the arguments.timestampaddPattern
in class Dialect
unit
- the first argumenttemporalType
- true if the third argument is apublic String timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType)
Dialect
timestampdiff()
function call. The resulting
pattern must contain ?1, ?2, and ?3 placeholders
for the arguments.timestampdiffPattern
in class Dialect
unit
- the first argumentfromTemporalType
- true if the first argument is
a timestamp, false if a datetoTemporalType
- true if the second argument ispublic boolean supportsRowValueConstructorSyntaxInInList()
Dialect
row values
,
does it offer such support in IN lists as well?
For example, "... where (FIRST_NAME, LAST_NAME) IN ( (?, ?), (?, ?) ) ..."supportsRowValueConstructorSyntaxInInList
in class Dialect
public boolean supportsUnionAll()
Dialect
supportsUnionAll
in class Dialect
public boolean supportsSelectAliasInGroupByClause()
supportsSelectAliasInGroupByClause
in class Dialect
public boolean supportsColumnCheck()
Dialect
supportsColumnCheck
in class Dialect
public String getQueryHintString(String query, String hints)
Dialect
getQueryHintString
in class Dialect
query
- The query to which to apply the hint.hints
- The hints to applypublic SequenceSupport getSequenceSupport()
getSequenceSupport
in class Dialect
public ViolatedConstraintNameExtractor getViolatedConstraintNameExtractor()
getViolatedConstraintNameExtractor
in interface ConversionContext
getViolatedConstraintNameExtractor
in class Dialect
public boolean qualifyIndexName()
Dialect
qualifyIndexName
in class Dialect
public String getAddForeignKeyConstraintString(String constraintName, String[] foreignKey, String referencedTable, String[] primaryKey, boolean referencesPrimaryKey)
Dialect
getAddForeignKeyConstraintString
in class Dialect
constraintName
- 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 Dialect
public LimitHandler getLimitHandler()
Dialect
LimitHandler
that implements support for
Query.setMaxResults(int)
and
Query.setFirstResult(int)
for
this dialect.getLimitHandler
in class Dialect
public String getFromDual()
Dialect
getFromDual
in class Dialect
from dual
.public char closeQuote()
Dialect
closeQuote
in class Dialect
public char openQuote()
Dialect
public boolean canCreateCatalog()
Dialect
canCreateCatalog
in class Dialect
public String[] getCreateCatalogCommand(String catalogName)
Dialect
getCreateCatalogCommand
in class Dialect
catalogName
- The name of the catalog to be created.public String[] getDropCatalogCommand(String catalogName)
Dialect
getDropCatalogCommand
in class Dialect
catalogName
- The name of the catalog to be dropped.public boolean canCreateSchema()
Dialect
canCreateSchema
in class Dialect
public String[] getCreateSchemaCommand(String schemaName)
Dialect
getCreateSchemaCommand
in class Dialect
schemaName
- The name of the schema to be created.public String[] getDropSchemaCommand(String schemaName)
Dialect
getDropSchemaCommand
in class Dialect
schemaName
- The name of the schema to be dropped.public boolean supportsIfExistsBeforeTableName()
Dialect
Dialect.supportsIfExistsAfterTableName()
should return truesupportsIfExistsBeforeTableName
in class Dialect
true
if the "if exists" can be applied before the table namepublic String getSelectGUIDString()
Dialect
getSelectGUIDString
in class Dialect
public String getTableComment(String comment)
Dialect
getTableComment
in class Dialect
comment
- The comment to applypublic String getColumnComment(String comment)
Dialect
getColumnComment
in class Dialect
comment
- The comment to applypublic NullOrdering getNullOrdering()
Dialect
getNullOrdering
in class Dialect
public SqmMultiTableMutationStrategy getFallbackSqmMutationStrategy(EntityMappingType rootEntityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext)
getFallbackSqmMutationStrategy
in class Dialect
public String getCastTypeName(SqlExpressable type, Long length, Integer precision, Integer scale)
Dialect
SqlExpressable
SQL type.getCastTypeName
in class Dialect
public boolean supportsCurrentTimestampSelection()
Dialect
supportsCurrentTimestampSelection
in class Dialect
public boolean isCurrentTimestampSelectStringCallable()
Dialect
Dialect.getCurrentTimestampSelectString()
be treated as callable. Typically this indicates that JDBC escape
syntax is being used...isCurrentTimestampSelectStringCallable
in class Dialect
Dialect.getCurrentTimestampSelectString()
return
is callable; false otherwise.public String getCurrentTimestampSelectString()
Dialect
getCurrentTimestampSelectString
in class Dialect
public int registerResultSetOutParameter(CallableStatement statement, int col) throws SQLException
Dialect
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.registerResultSetOutParameter
in class Dialect
statement
- 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
Dialect
Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int)
,
extract the ResultSet
from the OUT parameter.getResultSet
in class Dialect
ps
- The callable statement.SQLException
- Indicates problems extracting the result set.public UniqueDelegate getUniqueDelegate()
Dialect
getUniqueDelegate
in class Dialect
public boolean supportsRowValueConstructorSyntax()
Dialect
supportsRowValueConstructorSyntax
in class Dialect
public boolean supportsNullPrecedence()
supportsNullPrecedence
in class Dialect
public boolean supportsRowValueConstructorSyntaxInSet()
Dialect
supportsRowValueConstructorSyntaxInSet
in class Dialect
public String renderOrderByElement(String expression, String collation, String order, NullPrecedence nulls)
Dialect
renderOrderByElement
in class Dialect
expression
- 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()
Dialect
supportsEmptyInList
in class Dialect
public boolean areStringComparisonsCaseInsensitive()
Dialect
areStringComparisonsCaseInsensitive
in class Dialect
public boolean supportsLobValueChangePropagation()
Dialect
Blob.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 Dialect
public boolean supportsSubqueryOnMutatingTable()
Dialect
supportsSubqueryOnMutatingTable
in class Dialect
public boolean supportsLockTimeouts()
Dialect
supportsLockTimeouts
in class Dialect
public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate()
Dialect
SQLExceptionConversionDelegate
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 Dialect
public IdentifierHelper buildIdentifierHelper(IdentifierHelperBuilder builder, DatabaseMetaData dbMetaData) throws SQLException
Dialect
null
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 Dialect
builder
- A semi-configured IdentifierHelper builder.dbMetaData
- Access to the metadata returned from the driver if needed and if available. WARNING: may be null
null
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)
Dialect
getNotExpression
in class Dialect
expression
- The expression to negatepublic IdentityColumnSupport getIdentityColumnSupport()
Dialect
IdentityColumnSupport
getIdentityColumnSupport
in class Dialect
public boolean isJdbcLogWarningsEnabledByDefault()
Dialect
isJdbcLogWarningsEnabledByDefault
in class Dialect
public boolean supportsCascadeDelete()
Dialect
supportsCascadeDelete
in class Dialect
true
indicates that the dialect does support cascaded delete on foreign keys.public String getTableTypeString()
getTableTypeString
in class Dialect
public boolean hasSelfReferentialForeignKeyBug()
Dialect
hasSelfReferentialForeignKeyBug
in class Dialect
true
if the database/driver has this bugpublic boolean dropConstraints()
Dialect
dropConstraints
in class Dialect
protected MySQLStorageEngine getDefaultMySQLStorageEngine()
protected String escapeLiteral(String literal)
Dialect
escapeLiteral
in class Dialect
public String translateDatetimeFormat(String format)
Dialect
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:
translateDatetimeFormat
in class Dialect
public String getWriteLockString(int timeout)
Dialect
getWriteLockString
in class Dialect
timeout
- in milliseconds, -1 for indefinite wait and 0 for no wait.public String getWriteLockString(String aliases, int timeout)
Dialect
getWriteLockString
in class Dialect
aliases
- The columns to be read locked.timeout
- in milliseconds, -1 for indefinite wait and 0 for no wait.public String getReadLockString(int timeout)
Dialect
getReadLockString
in class Dialect
timeout
- in milliseconds, -1 for indefinite wait and 0 for no wait.public String getReadLockString(String aliases, int timeout)
Dialect
getReadLockString
in class Dialect
aliases
- The columns to be read locked.timeout
- in milliseconds, -1 for indefinite wait and 0 for no wait.public String getForUpdateSkipLockedString()
Dialect
getForUpdateSkipLockedString
in class Dialect
public String getForUpdateSkipLockedString(String aliases)
Dialect
getForUpdateSkipLockedString
in class Dialect
aliases
- The columns to be write locked.public String getForUpdateNowaitString()
Dialect
getForUpdateNowaitString
in class Dialect
public String getForUpdateNowaitString(String aliases)
Dialect
getForUpdateNowaitString
in class Dialect
aliases
- The columns to be write locked.public String getForUpdateString(String aliases)
Dialect
getForUpdateString
in class Dialect
aliases
- The columns to be write locked.public boolean supportsOffsetInSubquery()
Dialect
supportsOffsetInSubquery
in class Dialect
public boolean supportsWindowFunctions()
Dialect
supportsWindowFunctions
in class Dialect
true
if the underlying database supports window functions,
false
otherwise. The default is false
.public boolean supportsSkipLocked()
Dialect
supportsSkipLocked
in class Dialect
true
if SKIP_LOCKED is supportedpublic boolean supportsNoWait()
Dialect
supportsNoWait
in class Dialect
true
if NO_WAIT is supportedpublic boolean supportsWait()
Dialect
supportsWait
in class Dialect
true
if WAIT is supportedpublic RowLockStrategy getWriteRowLockStrategy()
Dialect
getWriteRowLockStrategy
in class Dialect
public GroupBySummarizationRenderingStrategy getGroupBySummarizationRenderingStrategy()
Dialect
getGroupBySummarizationRenderingStrategy
in class Dialect
Copyright © 2001-2021 Red Hat, Inc. All Rights Reserved.