Package org.hibernate.dialect
Class TiDBDialect
- java.lang.Object
-
- org.hibernate.dialect.Dialect
-
- org.hibernate.dialect.MySQLDialect
-
- org.hibernate.dialect.TiDBDialect
-
- All Implemented Interfaces:
ConversionContext
public class TiDBDialect extends MySQLDialect
An SQL dialect for TiDB (prior to 5.x).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hibernate.dialect.Dialect
Dialect.SizeStrategy, Dialect.SizeStrategyImpl
-
-
Field Summary
-
Fields inherited from class org.hibernate.dialect.Dialect
CLOSED_QUOTE, LEGACY_LOB_MERGE_STRATEGY, NEW_LOCATOR_LOB_MERGE_STRATEGY, QUOTE, STANDARD_DEFAULT_BATCH_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGY
-
-
Constructor Summary
Constructors Constructor Description TiDBDialect()TiDBDialect(DatabaseVersion version)TiDBDialect(DialectResolutionInfo info)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetForUpdateNowaitString()Retrieves the FOR UPDATE NOWAIT syntax specific to this dialect.StringgetForUpdateNowaitString(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.DatabaseVersiongetMySQLVersion()StringgetQuerySequencesString()Get the select command used retrieve the names of all sequences.StringgetReadLockString(int timeout)Get the string to append to SELECT statements to acquire READ locks for this dialect.StringgetReadLockString(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.SequenceInformationExtractorgetSequenceInformationExtractor()A source ofSequenceInformation.SequenceSupportgetSequenceSupport()No support for sequences.SqlAstTranslatorFactorygetSqlAstTranslatorFactory()Return an SqlAstTranslatorFactory specific for the Dialect.StringgetWriteLockString(int timeout)Get the string to append to SELECT statements to acquire WRITE locks for this dialect.booleansupportsCascadeDelete()Does this dialect support cascaded delete on foreign key definitions?booleansupportsNoWait()Does this dialect/database support NO_WAIT timeout.booleansupportsWait()Does this dialect/database support WAIT timeout.-
Methods inherited from class org.hibernate.dialect.MySQLDialect
appendDatetimeFormat, appendLiteral, beforeRegisteringColumnTypes, beforeRegisteringColumnTypes, buildIdentifierHelper, buildSQLExceptionConversionDelegate, canCreateCatalog, canCreateSchema, castPattern, closeQuote, columnType, contributeTypes, currentTimestamp, datetimeFormat, dropConstraints, extractPattern, getAddForeignKeyConstraintString, getCastTypeName, getCharacterSetBytesPerCharacter, getColumnComment, getCreateCatalogCommand, getCreateSchemaCommand, getCurrentTimestampSelectString, getDefaultLobLength, getDefaultMySQLStorageEngine, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getFallbackSqmInsertStrategy, getFallbackSqmMutationStrategy, getFloatPrecision, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getFractionalSecondPrecisionInNanos, getGroupBySelectItemReferenceStrategy, getIdentityColumnSupport, getLimitHandler, getMaxAliasLength, getMaxIdentifierLength, getMaxVarbinaryLength, getMaxVarcharLength, getNameQualifierSupport, getNullColumnString, getNullOrdering, getPreferredSqlTypeCodeForBoolean, getQueryHintString, getResultSet, getSelectGUIDString, getSizeStrategy, getSupportedJdbcTypeCodes, getSupportedTemporaryTableKind, getTableComment, getTableTypeString, getTemporaryTableAfterUseAction, getTemporaryTableBeforeUseAction, getTemporaryTableCreateCommand, getTemporaryTableDropCommand, getUniqueDelegate, getViolatedConstraintNameExtractor, getWriteLockString, getWriteRowLockStrategy, hasSelfReferentialForeignKeyBug, initDefaultProperties, initializeFunctionRegistry, isCurrentTimestampSelectStringCallable, isJdbcLogWarningsEnabledByDefault, openQuote, qualifyIndexName, registerDefaultColumnTypes, registerResultSetOutParameter, resolveSqlTypeDescriptor, supportsColumnCheck, supportsCurrentTimestampSelection, supportsIfExistsBeforeTableName, supportsLateral, supportsLobValueChangePropagation, supportsLockTimeouts, supportsNullPrecedence, supportsOffsetInSubquery, supportsSkipLocked, supportsSubqueryOnMutatingTable, supportsUnionAll, supportsWindowFunctions, timestampaddPattern, timestampdiffPattern
-
Methods inherited from class org.hibernate.dialect.Dialect
addSqlHintOrComment, appendBinaryLiteral, appendBooleanValueString, appendDateTimeLiteral, appendDateTimeLiteral, appendDateTimeLiteral, appendIntervalLiteral, appendLockHint, applyLocksToSql, augmentRecognizedTableTypes, binaryToDecimalPrecision, currentDate, currentLocalTime, currentLocalTimestamp, currentTime, currentTimestampWithTimeZone, defaultScrollMode, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, equivalentTypes, escapeComment, forceLobAsLastValue, getAddColumnString, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getBooleanCheckCondition, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getColumnAliasExtractor, getCreateMultisetTableString, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCurrentSchemaCommand, getDefaultBatchLoadSizingStrategy, getDefaultDecimalPrecision, getDefaultNonContextualLobCreation, getDefaultProperties, getDefaultStatementBatchSize, getDefaultTimestampPrecision, getDefaultUseGetGeneratedKeys, getDefaultUseStreamsForBinary, getDoublePrecision, getDropTableString, getEnumCheckCondition, getForeignKeyExporter, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getHibernateTypeName, getHibernateTypeName, getHqlTranslator, getIndexExporter, getInExpressionCountLimit, getKeywords, getLobMergeStrategy, getLockingStrategy, getLockRowIdentifier, getLowercaseFunction, getMaxNVarcharLength, getNationalizationSupport, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNullColumnString, getQueryHintString, getRawTypeName, getRawTypeName, getReadRowLockStrategy, getResultSet, getResultSet, getSchemaNameResolver, getSelectClauseNullString, getSequenceExporter, getSqmTranslatorFactory, getTableExporter, getTemporaryTableCreateOptions, getTemporaryTableDdlTransactionHandling, getTemporaryTableExporter, getTemporaryTableTruncateCommand, getTimeZoneSupport, getTypeName, getTypeName, getTypeName, getTypeName, getUniqueKeyExporter, getVersion, hasAlterTable, inlineLiteral, isAnsiNullOn, isEmptyStringTreatedAsNull, isLockTimeoutParameterized, isTypeNameRegistered, prependComment, quote, registerColumnType, registerColumnType, registerDefaultColumnTypes, registerDefaultKeywords, registerHibernateType, registerHibernateType, registerHibernateTypes, registerKeyword, registerKeywords, registerResultSetOutParameter, requiresFloatCastingOfIntegerDivision, requiresParensForTupleCounts, requiresParensForTupleDistinctCounts, resolveSqlTypeLength, supportsBindAsCallableArgument, supportsBitType, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsCommentOn, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsFetchClause, supportsFractionalTimestampArithmetic, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsJdbcConnectionLobCreation, supportsNamedParameters, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsOrderByInSubquery, supportsOrdinalSelectItemReference, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPartitionBy, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsSubqueryInSelect, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTemporalLiteralOffset, supportsTemporaryTablePrimaryKey, supportsTemporaryTables, supportsTruncateWithCast, supportsTupleCounts, supportsTupleDistinctCounts, supportsUnboundedLobLocatorMaterialization, supportsUnionInSubquery, supportsValuesList, supportsValuesListForInsert, toBooleanValueString, toString, transformSelectString, translateDurationField, translateExtractField, trimPattern, useFollowOnLocking, useInputStreamToInsertBlob
-
-
-
-
Constructor Detail
-
TiDBDialect
public TiDBDialect()
-
TiDBDialect
public TiDBDialect(DatabaseVersion version)
-
TiDBDialect
public TiDBDialect(DialectResolutionInfo info)
-
-
Method Detail
-
getMySQLVersion
public DatabaseVersion getMySQLVersion()
- Overrides:
getMySQLVersionin classMySQLDialect
-
supportsCascadeDelete
public boolean supportsCascadeDelete()
Description copied from class:DialectDoes this dialect support cascaded delete on foreign key definitions?- Overrides:
supportsCascadeDeletein classMySQLDialect- Returns:
trueindicates that the dialect does support cascaded delete on foreign keys.
-
getQuerySequencesString
public String getQuerySequencesString()
Description copied from class:DialectGet the select command used retrieve the names of all sequences.- Overrides:
getQuerySequencesStringin classDialect- Returns:
- The select command; or null if sequences are not supported.
-
getSequenceSupport
public SequenceSupport getSequenceSupport()
Description copied from class:MySQLDialectNo support for sequences.- Overrides:
getSequenceSupportin classMySQLDialect
-
getSequenceInformationExtractor
public SequenceInformationExtractor getSequenceInformationExtractor()
Description copied from class:DialectA source ofSequenceInformation.- Overrides:
getSequenceInformationExtractorin classDialect
-
getSqlAstTranslatorFactory
public SqlAstTranslatorFactory getSqlAstTranslatorFactory()
Description copied from class:DialectReturn an SqlAstTranslatorFactory specific for the Dialect. Returnnullto use Hibernate's standard translator.- Overrides:
getSqlAstTranslatorFactoryin classMySQLDialect- See Also:
StandardSqlAstTranslatorFactory,JdbcEnvironment.getSqlAstTranslatorFactory()
-
supportsNoWait
public boolean supportsNoWait()
Description copied from class:DialectDoes this dialect/database support NO_WAIT timeout.- Overrides:
supportsNoWaitin classMySQLDialect- Returns:
trueif NO_WAIT is supported
-
supportsWait
public boolean supportsWait()
Description copied from class:DialectDoes this dialect/database support WAIT timeout.- Overrides:
supportsWaitin classMySQLDialect- Returns:
trueif WAIT is supported
-
getReadLockString
public String getReadLockString(int timeout)
Description copied from class:DialectGet the string to append to SELECT statements to acquire READ locks for this dialect. Location of the returned string is treated the same as getForUpdateString.- Overrides:
getReadLockStringin classMySQLDialect- Parameters:
timeout- in milliseconds, -1 for indefinite wait and 0 for no wait.- Returns:
- The appropriate LOCK clause string.
-
getReadLockString
public String getReadLockString(String aliases, int timeout)
Description copied from class:DialectGet the string to append to SELECT statements to acquire READ locks for this dialect given the aliases of the columns to be read locked. Location of the returned string is treated the same as getForUpdateString.- Overrides:
getReadLockStringin classMySQLDialect- Parameters:
aliases- The columns to be read locked.timeout- in milliseconds, -1 for indefinite wait and 0 for no wait.- Returns:
- The appropriate LOCK clause string.
-
getWriteLockString
public String getWriteLockString(int timeout)
Description copied from class:DialectGet the string to append to SELECT statements to acquire WRITE locks for this dialect. Location of the returned string is treated the same as getForUpdateString.- Overrides:
getWriteLockStringin classMySQLDialect- Parameters:
timeout- in milliseconds, -1 for indefinite wait and 0 for no wait.- Returns:
- The appropriate LOCK clause string.
-
getForUpdateNowaitString
public String getForUpdateNowaitString()
Description copied from class:DialectRetrieves the FOR UPDATE NOWAIT syntax specific to this dialect.- Overrides:
getForUpdateNowaitStringin classMySQLDialect- Returns:
- The appropriate FOR UPDATE NOWAIT clause string.
-
getForUpdateNowaitString
public String getForUpdateNowaitString(String aliases)
Description copied from class:DialectGet the FOR UPDATE OF column_list NOWAIT fragment appropriate for this dialect given the aliases of the columns to be write locked.- Overrides:
getForUpdateNowaitStringin classMySQLDialect- Parameters:
aliases- The columns to be write locked.- Returns:
- The appropriate FOR UPDATE OF colunm_list NOWAIT clause string.
-
-