Package org.hibernate.dialect
Class MySQLDialect
- java.lang.Object
-
- org.hibernate.dialect.Dialect
-
- org.hibernate.dialect.MySQLDialect
-
- All Implemented Interfaces:
ConversionContext
- Direct Known Subclasses:
MySQL5Dialect
,MySQLInnoDBDialect
,MySQLMyISAMDialect
,MySQLSpatialDialect
public class MySQLDialect extends Dialect
An SQL dialect for MySQL (prior to 5.x).
-
-
Field Summary
-
Fields inherited from class org.hibernate.dialect.Dialect
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
-
-
Constructor Summary
Constructors Constructor Description MySQLDialect()
Constructs a MySQLDialect
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
areStringComparisonsCaseInsensitive()
Are string comparisons implicitly case insensitive.SQLExceptionConversionDelegate
buildSQLExceptionConversionDelegate()
Build an instance of aSQLExceptionConversionDelegate
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.boolean
dropConstraints()
Do we need to drop constraints before dropping tables in this dialect?protected java.lang.String
escapeLiteral(java.lang.String literal)
Escape String literal.protected java.lang.String
fixedPointNumberCastTarget()
Determine the cast target forTypes.NUMERIC
protected java.lang.String
floatingPointNumberCastTarget()
Determine the cast target forTypes.FLOAT
andTypes.REAL
(DOUBLE)java.lang.String
getAddColumnString()
The syntax used to add a column to a table (optional).java.lang.String
getAddForeignKeyConstraintString(java.lang.String constraintName, java.lang.String[] foreignKey, java.lang.String referencedTable, java.lang.String[] primaryKey, boolean referencesPrimaryKey)
The syntax used to add a foreign key constraint to a table.java.lang.String
getCastTypeName(int code)
Get the name of the database type appropriate for casting operations (via the CAST() SQL function) for the givenTypes
typecode.java.lang.String
getColumnComment(java.lang.String comment)
Get the comment into a form supported for column definition.java.lang.String[]
getCreateCatalogCommand(java.lang.String catalogName)
Get the SQL command used to create the named catalogjava.lang.String[]
getCreateSchemaCommand(java.lang.String schemaName)
Get the SQL command used to create the named schemajava.lang.String
getCurrentTimestampSelectString()
Retrieve the command used to retrieve the current timestamp from the database.MultiTableBulkIdStrategy
getDefaultMultiTableBulkIdStrategy()
protected MySQLStorageEngine
getDefaultMySQLStorageEngine()
java.lang.String[]
getDropCatalogCommand(java.lang.String catalogName)
Get the SQL command used to drop the named catalogjava.lang.String
getDropForeignKeyString()
java.lang.String[]
getDropSchemaCommand(java.lang.String schemaName)
Get the SQL command used to drop the named schemaprotected java.lang.String
getEngineKeyword()
java.lang.String
getForUpdateString()
Get the string to append to SELECT statements to acquire locks for this dialect.IdentityColumnSupport
getIdentityColumnSupport()
Get the appropriateIdentityColumnSupport
LimitHandler
getLimitHandler()
Returns the delegate managing LIMIT clause.java.lang.String
getLimitString(java.lang.String sql, boolean hasOffset)
Apply s limit clause to the query.java.lang.String
getNotExpression(java.lang.String expression)
Negate an expressionjava.lang.String
getReadLockString(int timeout)
Get the string to append to SELECT statements to acquire READ locks for this dialect.java.sql.ResultSet
getResultSet(java.sql.CallableStatement ps)
Given a callable statement previously processed byDialect.registerResultSetOutParameter(java.sql.CallableStatement, int)
, extract theResultSet
from the OUT parameter.java.lang.String
getSelectGUIDString()
Get the command used to select a GUID from the underlying database.java.lang.String
getTableComment(java.lang.String comment)
Get the comment into a form supported for table definition.java.lang.String
getTableTypeString()
UniqueDelegate
getUniqueDelegate()
Get the UniqueDelegate supported by this dialectjava.lang.String
getWriteLockString(int timeout)
Get the string to append to SELECT statements to acquire WRITE locks for this dialect.boolean
hasSelfReferentialForeignKeyBug()
Does the database/driver have bug in deleting rows that refer to other rows being deleted in the same query?boolean
isCurrentTimestampSelectStringCallable()
Should the value returned byDialect.getCurrentTimestampSelectString()
be treated as callable.boolean
isJdbcLogWarningsEnabledByDefault()
Does the fetching JDBC statement warning for logging is enabled by defaultchar
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(java.sql.CallableStatement statement, int col)
Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of returningResultSet
*by position*.protected void
registerVarcharTypes()
java.lang.String
renderOrderByElement(java.lang.String expression, java.lang.String collation, java.lang.String order, NullPrecedence nulls)
Renders an ordering fragmentprotected java.lang.String
smallIntegerCastTarget()
Determine the cast target forTypes.INTEGER
,Types.BIGINT
andTypes.SMALLINT
boolean
supportsCascadeDelete()
Does this dialect support cascaded delete on foreign key definitions?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?boolean
supportsIfExistsBeforeTableName()
For dropping a table, can the phrase "if exists" be applied before the table name?boolean
supportsLimit()
Does this dialect support some form of limiting query results via a SQL clause?boolean
supportsLobValueChangePropogation()
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
supportsRowValueConstructorSyntax()
Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax.boolean
supportsSubqueryOnMutatingTable()
Does this dialect support referencing the table being mutated in a subquery.-
Methods inherited from class org.hibernate.dialect.Dialect
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, augmentRecognizedTableTypes, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildIdentifierHelper, buildSQLExceptionConverter, cast, cast, cast, contributeTypes, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, defaultScrollMode, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, escapeComment, forceLimitUsage, forceLobAsLastValue, forUpdateOfColumns, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getColumnAliasExtractor, getCreateMultisetTableString, getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCrossJoinSeparator, getCurrentSchemaCommand, getCurrentTimestampSQLFunctionName, getDefaultBatchLoadSizingStrategy, getDefaultProperties, getDialect, getDialect, getDropSequenceString, getDropSequenceStrings, getDropTableString, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIndexExporter, getInExpressionCountLimit, getKeywords, getLimitString, getLobMergeStrategy, getLockingStrategy, getLowercaseFunction, getMaxAliasLength, getNameQualifierSupport, getNativeIdentifierGeneratorClass, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNullColumnString, getQueryHintString, getQueryHintString, getQuerySequencesString, getReadLockString, getResultSet, getResultSet, getSchemaNameResolver, getSelectClauseNullString, getSelectSequenceNextValString, getSequenceExporter, getSequenceInformationExtractor, getSequenceNextValString, getSqlTypeDescriptorOverride, getTableExporter, getTypeName, getTypeName, getUniqueKeyExporter, getViolatedConstraintNameExtracter, getWriteLockString, hasAlterTable, inlineLiteral, isLegacyLimitHandlerBehaviorEnabled, isLockTimeoutParameterized, isTypeNameRegistered, prependComment, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, remapSqlTypeDescriptor, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, requiresParensForTupleDistinctCounts, supportsBindAsCallableArgument, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCommentOn, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsLimitOffset, supportsNamedParameters, supportsNationalizedTypes, supportsNonQueryWithCTE, supportsNotNullUnique, supportsNoWait, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPartitionBy, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntaxInInList, supportsSequences, supportsSkipLocked, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsTupleDistinctCounts, supportsTuplesInSubqueries, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, useFollowOnLocking, useFollowOnLocking, useInputStreamToInsertBlob, useMaxForLimit
-
-
-
-
Method Detail
-
registerVarcharTypes
protected void registerVarcharTypes()
-
getAddColumnString
public java.lang.String getAddColumnString()
Description copied from class:Dialect
The syntax used to add a column to a table (optional).- Overrides:
getAddColumnString
in classDialect
- Returns:
- The "add column" fragment.
-
qualifyIndexName
public boolean qualifyIndexName()
Description copied from class:Dialect
Do we need to qualify index names with the schema name?- Overrides:
qualifyIndexName
in classDialect
- Returns:
- boolean
-
getAddForeignKeyConstraintString
public java.lang.String getAddForeignKeyConstraintString(java.lang.String constraintName, java.lang.String[] foreignKey, java.lang.String referencedTable, java.lang.String[] primaryKey, boolean referencesPrimaryKey)
Description copied from class:Dialect
The syntax used to add a foreign key constraint to a table.- Overrides:
getAddForeignKeyConstraintString
in classDialect
- Parameters:
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 to- Returns:
- the "add FK" fragment
-
supportsLimit
public boolean supportsLimit()
Description copied from class:Dialect
Does this dialect support some form of limiting query results via a SQL clause?- Overrides:
supportsLimit
in classDialect
- Returns:
- True if this dialect supports some form of LIMIT.
-
getDropForeignKeyString
public java.lang.String getDropForeignKeyString()
- Overrides:
getDropForeignKeyString
in classDialect
-
getLimitHandler
public LimitHandler getLimitHandler()
Description copied from class:Dialect
Returns the delegate managing LIMIT clause.- Overrides:
getLimitHandler
in classDialect
- Returns:
- LIMIT clause delegate.
-
getLimitString
public java.lang.String getLimitString(java.lang.String sql, boolean hasOffset)
Description copied from class:Dialect
Apply s limit clause to the query. Typically dialects utilizevariable
limit clauses when they support limits. Thus, when building the select command we do not actually need to know the limit or the offest since we will just be using placeholders. Here we do still pass along whether or not an offset was specified so that dialects not supporting offsets can generate proper exceptions. In general, dialects will override one or the other of this method andDialect.getLimitString(String, int, int)
.- Overrides:
getLimitString
in classDialect
- Parameters:
sql
- The query to which to apply the limit.hasOffset
- Is the query requesting an offset?- Returns:
- the modified SQL
-
closeQuote
public char closeQuote()
Description copied from class:Dialect
The character specific to this dialect used to close a quoted identifier.- Overrides:
closeQuote
in classDialect
- Returns:
- The dialect's specific close quote character.
-
openQuote
public char openQuote()
Description copied from class:Dialect
The character specific to this dialect used to begin a quoted identifier.
-
canCreateCatalog
public boolean canCreateCatalog()
Description copied from class:Dialect
Does this dialect support catalog creation?- Overrides:
canCreateCatalog
in classDialect
- Returns:
- True if the dialect supports catalog creation; false otherwise.
-
getCreateCatalogCommand
public java.lang.String[] getCreateCatalogCommand(java.lang.String catalogName)
Description copied from class:Dialect
Get the SQL command used to create the named catalog- Overrides:
getCreateCatalogCommand
in classDialect
- Parameters:
catalogName
- The name of the catalog to be created.- Returns:
- The creation commands
-
getDropCatalogCommand
public java.lang.String[] getDropCatalogCommand(java.lang.String catalogName)
Description copied from class:Dialect
Get the SQL command used to drop the named catalog- Overrides:
getDropCatalogCommand
in classDialect
- Parameters:
catalogName
- The name of the catalog to be dropped.- Returns:
- The drop commands
-
canCreateSchema
public boolean canCreateSchema()
Description copied from class:Dialect
Does this dialect support schema creation?- Overrides:
canCreateSchema
in classDialect
- Returns:
- True if the dialect supports schema creation; false otherwise.
-
getCreateSchemaCommand
public java.lang.String[] getCreateSchemaCommand(java.lang.String schemaName)
Description copied from class:Dialect
Get the SQL command used to create the named schema- Overrides:
getCreateSchemaCommand
in classDialect
- Parameters:
schemaName
- The name of the schema to be created.- Returns:
- The creation commands
-
getDropSchemaCommand
public java.lang.String[] getDropSchemaCommand(java.lang.String schemaName)
Description copied from class:Dialect
Get the SQL command used to drop the named schema- Overrides:
getDropSchemaCommand
in classDialect
- Parameters:
schemaName
- The name of the schema to be dropped.- Returns:
- The drop commands
-
supportsIfExistsBeforeTableName
public boolean supportsIfExistsBeforeTableName()
Description copied from class:Dialect
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 andDialect.supportsIfExistsAfterTableName()
should return true- Overrides:
supportsIfExistsBeforeTableName
in classDialect
- Returns:
true
if the "if exists" can be applied before the table name
-
getSelectGUIDString
public java.lang.String getSelectGUIDString()
Description copied from class:Dialect
Get the command used to select a GUID from the underlying database. Optional operation.- Overrides:
getSelectGUIDString
in classDialect
- Returns:
- The appropriate command.
-
getTableComment
public java.lang.String getTableComment(java.lang.String comment)
Description copied from class:Dialect
Get the comment into a form supported for table definition.- Overrides:
getTableComment
in classDialect
- Parameters:
comment
- The comment to apply- Returns:
- The comment fragment
-
getColumnComment
public java.lang.String getColumnComment(java.lang.String comment)
Description copied from class:Dialect
Get the comment into a form supported for column definition.- Overrides:
getColumnComment
in classDialect
- Parameters:
comment
- The comment to apply- Returns:
- The comment fragment
-
getDefaultMultiTableBulkIdStrategy
public MultiTableBulkIdStrategy getDefaultMultiTableBulkIdStrategy()
- Overrides:
getDefaultMultiTableBulkIdStrategy
in classDialect
-
getCastTypeName
public java.lang.String getCastTypeName(int code)
Description copied from class:Dialect
Get the name of the database type appropriate for casting operations (via the CAST() SQL function) for the givenTypes
typecode.- Overrides:
getCastTypeName
in classDialect
- Parameters:
code
- TheTypes
typecode- Returns:
- The database type name
-
smallIntegerCastTarget
protected java.lang.String smallIntegerCastTarget()
Determine the cast target forTypes.INTEGER
,Types.BIGINT
andTypes.SMALLINT
- Returns:
- The proper cast target type.
-
floatingPointNumberCastTarget
protected java.lang.String floatingPointNumberCastTarget()
Determine the cast target forTypes.FLOAT
andTypes.REAL
(DOUBLE)- Returns:
- The proper cast target type.
-
fixedPointNumberCastTarget
protected java.lang.String fixedPointNumberCastTarget()
Determine the cast target forTypes.NUMERIC
- Returns:
- The proper cast target type.
-
supportsCurrentTimestampSelection
public boolean supportsCurrentTimestampSelection()
Description copied from class:Dialect
Does this dialect support a way to retrieve the database's current timestamp value?- Overrides:
supportsCurrentTimestampSelection
in classDialect
- Returns:
- True if the current timestamp can be retrieved; false otherwise.
-
isCurrentTimestampSelectStringCallable
public boolean isCurrentTimestampSelectStringCallable()
Description copied from class:Dialect
Should the value returned byDialect.getCurrentTimestampSelectString()
be treated as callable. Typically this indicates that JDBC escape syntax is being used...- Overrides:
isCurrentTimestampSelectStringCallable
in classDialect
- Returns:
- True if the
Dialect.getCurrentTimestampSelectString()
return is callable; false otherwise.
-
getCurrentTimestampSelectString
public java.lang.String getCurrentTimestampSelectString()
Description copied from class:Dialect
Retrieve the command used to retrieve the current timestamp from the database.- Overrides:
getCurrentTimestampSelectString
in classDialect
- Returns:
- The command.
-
registerResultSetOutParameter
public int registerResultSetOutParameter(java.sql.CallableStatement statement, int col) throws java.sql.SQLException
Description copied from class:Dialect
Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of returningResultSet
*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.- Overrides:
registerResultSetOutParameter
in classDialect
- Parameters:
statement
- The callable statement.col
- The bind position at which to register the output param.- Returns:
- The number of (contiguous) bind positions used.
- Throws:
java.sql.SQLException
- Indicates problems registering the param.
-
getResultSet
public java.sql.ResultSet getResultSet(java.sql.CallableStatement ps) throws java.sql.SQLException
Description copied from class:Dialect
Given a callable statement previously processed byDialect.registerResultSetOutParameter(java.sql.CallableStatement, int)
, extract theResultSet
from the OUT parameter.- Overrides:
getResultSet
in classDialect
- Parameters:
ps
- The callable statement.- Returns:
- The extracted result set.
- Throws:
java.sql.SQLException
- Indicates problems extracting the result set.
-
getUniqueDelegate
public UniqueDelegate getUniqueDelegate()
Description copied from class:Dialect
Get the UniqueDelegate supported by this dialect- Overrides:
getUniqueDelegate
in classDialect
- Returns:
- The UniqueDelegate
-
supportsRowValueConstructorSyntax
public boolean supportsRowValueConstructorSyntax()
Description copied from class:Dialect
Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax. Basically, does it support syntax like "... where (FIRST_NAME, LAST_NAME) = ('Steve', 'Ebersole') ...".- Overrides:
supportsRowValueConstructorSyntax
in classDialect
- Returns:
- True if this SQL dialect is known to support "row value constructor" syntax; false otherwise.
-
renderOrderByElement
public java.lang.String renderOrderByElement(java.lang.String expression, java.lang.String collation, java.lang.String order, NullPrecedence nulls)
Description copied from class:Dialect
Renders an ordering fragment- Overrides:
renderOrderByElement
in classDialect
- Parameters:
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 formatcollate IDENTIFIER
, ornull
if expression has not been explicitly specified.order
- Order direction. Possible values:asc
,desc
, ornull
if expression has not been explicitly specified.nulls
- Nulls precedence. Default value:NullPrecedence.NONE
.- Returns:
- Renders single element of
ORDER BY
clause.
-
getForUpdateString
public java.lang.String getForUpdateString()
Description copied from class:Dialect
Get the string to append to SELECT statements to acquire locks for this dialect.- Overrides:
getForUpdateString
in classDialect
- Returns:
- The appropriate FOR UPDATE clause string.
-
getWriteLockString
public java.lang.String getWriteLockString(int timeout)
Description copied from class:Dialect
Get the string to append to SELECT statements to acquire WRITE locks for this dialect. Location of the of the returned string is treated the same as getForUpdateString.- Overrides:
getWriteLockString
in classDialect
- Parameters:
timeout
- in milliseconds, -1 for indefinite wait and 0 for no wait.- Returns:
- The appropriate LOCK clause string.
-
getReadLockString
public java.lang.String getReadLockString(int timeout)
Description copied from class:Dialect
Get the string to append to SELECT statements to acquire READ locks for this dialect. Location of the of the returned string is treated the same as getForUpdateString.- Overrides:
getReadLockString
in classDialect
- Parameters:
timeout
- in milliseconds, -1 for indefinite wait and 0 for no wait.- Returns:
- The appropriate LOCK clause string.
-
supportsEmptyInList
public boolean supportsEmptyInList()
Description copied from class:Dialect
Does this dialect support empty IN lists? For example, is [where XYZ in ()] a supported construct?- Overrides:
supportsEmptyInList
in classDialect
- Returns:
- True if empty in lists are supported; false otherwise.
-
areStringComparisonsCaseInsensitive
public boolean areStringComparisonsCaseInsensitive()
Description copied from class:Dialect
Are string comparisons implicitly case insensitive. In other words, does [where 'XYZ' = 'xyz'] resolve to true?- Overrides:
areStringComparisonsCaseInsensitive
in classDialect
- Returns:
- True if comparisons are case insensitive.
-
supportsLobValueChangePropogation
public boolean supportsLobValueChangePropogation()
Description copied from class:Dialect
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... For BLOBs, the internal value might be changed by:Blob.setBinaryStream(long)
,Blob.setBytes(long, byte[])
,Blob.setBytes(long, byte[], int, int)
, orBlob.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)
, orClob.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 notDialect.supportsExpectedLobUsagePattern()
.- Overrides:
supportsLobValueChangePropogation
in classDialect
- Returns:
- True if the changes are propagated back to the database; false otherwise.
-
supportsSubqueryOnMutatingTable
public boolean supportsSubqueryOnMutatingTable()
Description copied from class:Dialect
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)
- Overrides:
supportsSubqueryOnMutatingTable
in classDialect
- Returns:
- True if this dialect allows references the mutating table from a subquery.
-
supportsLockTimeouts
public boolean supportsLockTimeouts()
Description copied from class:Dialect
Informational metadata about whether this dialect is known to support specifying timeouts for requested lock acquisitions.- Overrides:
supportsLockTimeouts
in classDialect
- Returns:
- True is this dialect supports specifying lock timeouts.
-
buildSQLExceptionConversionDelegate
public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate()
Description copied from class:Dialect
Build an instance of aSQLExceptionConversionDelegate
for interpreting dialect-specific error or SQLState codes. WhenDialect.buildSQLExceptionConverter()
returns null, the defaultSQLExceptionConverter
is used to interpret SQLState and error codes. If this method is overridden to return a non-null value, the defaultSQLExceptionConverter
will use the returnedSQLExceptionConversionDelegate
in addition to the following standard delegates:- a "static" delegate based on the JDBC 4 defined SQLException hierarchy;
- a delegate that interprets SQLState codes for either X/Open or SQL-2003 codes, depending on java.sql.DatabaseMetaData#getSQLStateType
- Overrides:
buildSQLExceptionConversionDelegate
in classDialect
- Returns:
- The SQLExceptionConversionDelegate for this dialect
-
getNotExpression
public java.lang.String getNotExpression(java.lang.String expression)
Description copied from class:Dialect
Negate an expression- Overrides:
getNotExpression
in classDialect
- Parameters:
expression
- The expression to negate- Returns:
- The negated expression
-
getIdentityColumnSupport
public IdentityColumnSupport getIdentityColumnSupport()
Description copied from class:Dialect
Get the appropriateIdentityColumnSupport
- Overrides:
getIdentityColumnSupport
in classDialect
- Returns:
- the IdentityColumnSupport
-
isJdbcLogWarningsEnabledByDefault
public boolean isJdbcLogWarningsEnabledByDefault()
Description copied from class:Dialect
Does the fetching JDBC statement warning for logging is enabled by default- Overrides:
isJdbcLogWarningsEnabledByDefault
in classDialect
- Returns:
- boolean
-
supportsCascadeDelete
public boolean supportsCascadeDelete()
Description copied from class:Dialect
Does this dialect support cascaded delete on foreign key definitions?- Overrides:
supportsCascadeDelete
in classDialect
- Returns:
true
indicates that the dialect does support cascaded delete on foreign keys.
-
getTableTypeString
public java.lang.String getTableTypeString()
- Overrides:
getTableTypeString
in classDialect
-
getEngineKeyword
protected java.lang.String getEngineKeyword()
-
hasSelfReferentialForeignKeyBug
public boolean hasSelfReferentialForeignKeyBug()
Description copied from class:Dialect
Does the database/driver have bug in deleting rows that refer to other rows being deleted in the same query?- Overrides:
hasSelfReferentialForeignKeyBug
in classDialect
- Returns:
true
if the database/driver has this bug
-
dropConstraints
public boolean dropConstraints()
Description copied from class:Dialect
Do we need to drop constraints before dropping tables in this dialect?- Overrides:
dropConstraints
in classDialect
- Returns:
- True if constraints must be dropped prior to dropping the table; false otherwise.
-
getDefaultMySQLStorageEngine
protected MySQLStorageEngine getDefaultMySQLStorageEngine()
-
escapeLiteral
protected java.lang.String escapeLiteral(java.lang.String literal)
Description copied from class:Dialect
Escape String literal.- Overrides:
escapeLiteral
in classDialect
- Returns:
- escaped String
-
-