public class MySQLDialect extends Dialect
CLOSED_QUOTE, DEFAULT_BATCH_SIZE, LEGACY_LOB_MERGE_STRATEGY, NEW_LOCATOR_LOB_MERGE_STRATEGY, NO_BATCH, QUOTE, STREAM_XFER_LOB_MERGE_STRATEGY| Constructor and Description | 
|---|
| MySQLDialect() | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | areStringComparisonsCaseInsensitive()Are string comparisons implicitly case insensitive. | 
| SQLExceptionConversionDelegate | buildSQLExceptionConversionDelegate()Build an instance of a  SQLExceptionConversionDelegatefor
 interpreting dialect-specific error or SQLState codes. | 
| char | closeQuote()The character specific to this dialect used to close a quoted identifier. | 
| String | getAddColumnString()The syntax used to add a column to a table (optional). | 
| 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(int code)Get the name of the database type appropriate for casting operations
 (via the CAST() SQL function) for the given  Typestypecode. | 
| String | getColumnComment(String comment) | 
| String | getCreateTemporaryTableString()Command used to create a temporary table. | 
| String | getCurrentTimestampSelectString()Retrieve the command used to retrieve the current timestamp from the
 database. | 
| String | getDropForeignKeyString() | 
| String | getDropTemporaryTableString()Command used to drop a temporary table. | 
| String | getForUpdateString()Get the string to append to SELECT statements to acquire locks
 for this dialect. | 
| String | getIdentityColumnString()The syntax used during DDL to define a column as being an IDENTITY. | 
| String | getIdentitySelectString()Get the select command to use to retrieve the last generated IDENTITY
 value. | 
| String | getLimitString(String sql,
              boolean hasOffset)Apply s limit clause to the query. | 
| String | getNotExpression(String expression) | 
| String | getReadLockString(int timeout)Get the string to append to SELECT statements to acquire WRITE locks
 for this dialect. | 
| ResultSet | getResultSet(CallableStatement ps)Given a callable statement previously processed by  Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int),
 extract theResultSetfrom the OUT parameter. | 
| String | getSelectGUIDString()Get the command used to select a GUID from the underlying database. | 
| String | getTableComment(String comment) | 
| String | getWriteLockString(int timeout)Get the string to append to SELECT statements to acquire WRITE locks
 for this dialect. | 
| boolean | isCurrentTimestampSelectStringCallable()Should the value returned by  Dialect.getCurrentTimestampSelectString()be treated as callable. | 
| char | openQuote()The character specific to this dialect used to begin a quoted identifier. | 
| Boolean | performTemporaryTableDDLInIsolation()Does the dialect require that temporary table DDL statements occur in
 isolation from other statements?  This would be the case if the creation
 would cause any current transaction to get committed implicitly. | 
| boolean | qualifyIndexName()Do we need to qualify index names with the schema name? | 
| int | registerResultSetOutParameter(CallableStatement statement,
                             int col)Registers an OUT parameter which will be returning a
  ResultSet. | 
| protected void | registerVarcharTypes() | 
| String | renderOrderByElement(String expression,
                    String collation,
                    String order,
                    NullPrecedence nulls) | 
| boolean | supportsCascadeDelete() | 
| 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 | supportsIdentityColumns()Does this dialect support identity column key generation? | 
| boolean | supportsIfExistsBeforeTableName() | 
| 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. | 
| boolean | supportsTemporaryTables()Does this dialect support temporary tables? | 
appendIdentitySelectToInsert, appendLockHint, appendLockHint, applyLocksToSql, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildLimitHandler, buildSQLExceptionConverter, cast, cast, cast, contributeTypes, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, dropConstraints, dropTemporaryTableAfterUse, forceLimitUsage, forceLobAsLastValue, forUpdateOfColumns, generateTemporaryTableName, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getCascadeConstraintsString, getCaseInsensitiveLike, getColumnAliasExtractor, getCreateMultisetTableString, getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCreateTemporaryTablePostfix, getCrossJoinSeparator, getCurrentTimestampSQLFunctionName, getDefaultProperties, getDialect, getDialect, getDropSequenceString, getDropSequenceStrings, getDropTableString, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnString, getIdentityInsertString, getIdentitySelectString, getInExpressionCountLimit, getKeywords, getLimitString, getLobMergeStrategy, getLockingStrategy, getLowercaseFunction, getMaxAliasLength, getNativeIdentifierGeneratorClass, getNoColumnsInsertString, getNullColumnString, getQuerySequencesString, getSelectClauseNullString, getSelectSequenceNextValString, getSequenceNextValString, getSqlTypeDescriptorOverride, getTableTypeString, getTypeName, getTypeName, getUniqueDelegate, getViolatedConstraintNameExtracter, hasAlterTable, hasDataTypeInIdentityColumn, hasSelfReferentialForeignKeyBug, isLockTimeoutParameterized, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, remapSqlTypeDescriptor, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, requiresParensForTupleDistinctCounts, supportsBindAsCallableArgument, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCommentOn, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsIfExistsAfterTableName, supportsInsertSelectIdentity, supportsLimitOffset, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntaxInInList, supportsSequences, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsTupleDistinctCounts, supportsTuplesInSubqueries, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, useFollowOnLocking, useInputStreamToInsertBlob, useMaxForLimitprotected void registerVarcharTypes()
public String getAddColumnString()
DialectgetAddColumnString in class Dialectpublic boolean qualifyIndexName()
DialectqualifyIndexName in class Dialectpublic boolean supportsIdentityColumns()
DialectsupportsIdentityColumns in class Dialectpublic String getIdentitySelectString()
DialectgetIdentitySelectString in class Dialectpublic String getIdentityColumnString()
DialectgetIdentityColumnString 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 boolean supportsLimit()
DialectsupportsLimit in class Dialectpublic String getDropForeignKeyString()
getDropForeignKeyString in class Dialectpublic String getLimitString(String sql, boolean hasOffset)
Dialectvariable
 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 and
 Dialect.getLimitString(String, int, int).getLimitString in class Dialectsql - The query to which to apply the limit.hasOffset - Is the query requesting an offset?public char closeQuote()
DialectcloseQuote in class Dialectpublic char openQuote()
Dialectpublic boolean supportsIfExistsBeforeTableName()
supportsIfExistsBeforeTableName in class Dialectpublic String getSelectGUIDString()
DialectgetSelectGUIDString in class Dialectpublic boolean supportsCascadeDelete()
supportsCascadeDelete in class Dialectpublic String getTableComment(String comment)
getTableComment in class Dialectpublic String getColumnComment(String comment)
getColumnComment in class Dialectpublic boolean supportsTemporaryTables()
DialectsupportsTemporaryTables in class Dialectpublic String getCreateTemporaryTableString()
DialectgetCreateTemporaryTableString in class Dialectpublic String getDropTemporaryTableString()
DialectgetDropTemporaryTableString in class Dialectpublic Boolean performTemporaryTableDDLInIsolation()
DialectDatabaseMetaData.dataDefinitionCausesTransactionCommit()
 method.  However, that does not distinguish between temporary table
 DDL and other forms of DDL; MySQL, for example, reports DDL causing a
 transaction commit via its driver, even though that is not the case for
 temporary table DDL.
 
 Possible return values and their meanings:Boolean.TRUE - Unequivocally, perform the temporary table DDL
 in isolation.Boolean.FALSE - Unequivocally, do not perform the
 temporary table DDL in isolation.DatabaseMetaData.dataDefinitionCausesTransactionCommit()performTemporaryTableDDLInIsolation in class Dialectpublic String getCastTypeName(int code)
DialectTypes typecode.getCastTypeName in class Dialectcode - The Types typecodepublic 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.  How this is accomplished varies greatly
 from DB to DB, hence its inclusion (along with Dialect.getResultSet(java.sql.CallableStatement)) here.registerResultSetOutParameter in class Dialectstatement - The callable statement.col - The bind position at which to register the OUT param.SQLException - Indicates problems registering the OUT 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 boolean supportsRowValueConstructorSyntax()
DialectsupportsRowValueConstructorSyntax in class Dialectpublic String renderOrderByElement(String expression, String collation, String order, NullPrecedence nulls)
renderOrderByElement 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 String getForUpdateString()
DialectgetForUpdateString in class Dialectpublic String getWriteLockString(int timeout)
DialectgetWriteLockString in class Dialecttimeout - 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 boolean supportsEmptyInList()
DialectsupportsEmptyInList in class Dialectpublic boolean areStringComparisonsCaseInsensitive()
DialectareStringComparisonsCaseInsensitive in class Dialectpublic boolean supportsLobValueChangePropogation()
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().supportsLobValueChangePropogation 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 String getNotExpression(String expression)
getNotExpression in class DialectCopyright © 2018 JBoss by Red Hat. All rights reserved.