Top Description Fields Constructors Methods
org.hibernate.dialect

public Class TiDBDialect

extends MySQLDialect
Class Inheritance
Imports
org.hibernate.LockOptions, org.hibernate.dialect.sequence.SequenceSupport, .TiDBSequenceSupport, org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.sql.ast.SqlAstTranslator, .SqlAstTranslatorFactory, org.hibernate.sql.ast.spi.StandardSqlAstTranslatorFactory, org.hibernate.sql.ast.tree.Statement, org.hibernate.sql.exec.spi.JdbcOperation, org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorTiDBDatabaseImpl, org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor

A SQL dialect for TiDB.
Author
Cong Wang

Field Summary

Modifier and TypeField and Description
private static final DatabaseVersion
private static final DatabaseVersion

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
public String
getForUpdateNowaitString()

Overrides org.hibernate.dialect.MySQLDialect.getForUpdateNowaitString.

Retrieves the FOR UPDATE NOWAIT syntax specific to this dialect.
public String
getForUpdateNowaitString(String
The columns to be write locked.
aliases
)

Overrides org.hibernate.dialect.MySQLDialect.getForUpdateNowaitString.

Get the FOR UPDATE OF column_list NOWAIT fragment appropriate for this dialect, given the aliases of the columns to be write locked.
public FunctionalDependencyAnalysisSupport
getFunctionalDependencyAnalysisSupport()

Overrides org.hibernate.dialect.MySQLDialect.getFunctionalDependencyAnalysisSupport.

Get this dialect's level of support for primary key functional dependency analysis within GROUP BY and ORDER BY clauses.
protected DatabaseVersion
getMinimumSupportedVersion()

Overrides org.hibernate.dialect.MySQLDialect.getMinimumSupportedVersion.

Get the version of the SQL dialect that is the minimum supported by this implementation.
public DatabaseVersion
public String
getQuerySequencesString()

Overrides org.hibernate.dialect.Dialect.getQuerySequencesString.

Get the select command used retrieve the names of all sequences.
public String
getReadLockString(int
in milliseconds, -1 for indefinite wait and 0 for no wait.
timeout
)

Overrides org.hibernate.dialect.MySQLDialect.getReadLockString.

Get the string to append to SELECT statements to acquire READ locks for this dialect.
public String
getReadLockString(String
The columns to be read locked.
aliases
,
int
in milliseconds, -1 for indefinite wait and 0 for no wait.
timeout
)

Overrides org.hibernate.dialect.MySQLDialect.getReadLockString.

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.
public SequenceInformationExtractor
public SequenceSupport
public SqlAstTranslatorFactory
public String
getWriteLockString(int
in milliseconds, -1 for indefinite wait and 0 for no wait.
timeout
)

Overrides org.hibernate.dialect.MySQLDialect.getWriteLockString.

Get the string to append to SELECT statements to acquire pessimistic WRITE locks for this dialect.
protected void
registerDefaultKeywords()

Overrides org.hibernate.dialect.MySQLDialect.registerDefaultKeywords.

Register the reserved words of ANSI-standard SQL as keywords.
pack-priv boolean
public boolean
supportsCascadeDelete()

Overrides org.hibernate.dialect.MySQLDialect.supportsCascadeDelete.

Does this dialect support on delete actions in foreign key definitions?
pack-priv boolean
public boolean
supportsNoWait()

Overrides org.hibernate.dialect.MySQLDialect.supportsNoWait.

Does this dialect support NO_WAIT timeout.
public boolean
supportsRecursiveCTE()

Overrides org.hibernate.dialect.MySQLDialect.supportsRecursiveCTE.

Does this dialect/database support recursive CTEs?
public boolean
supportsSkipLocked()

Overrides org.hibernate.dialect.MySQLDialect.supportsSkipLocked.

Does this dialect support SKIP_LOCKED timeout.
public boolean
supportsWait()

Overrides org.hibernate.dialect.MySQLDialect.supportsWait.

Does this dialect support WAIT timeout.
Inherited from org.hibernate.dialect.MySQLDialect:
appendDatetimeFormatappendDateTimeLiteralappendDateTimeLiteralappendDateTimeLiteralappendLiteralbuildIdentifierHelperbuildSQLExceptionConversionDelegatecanCreateCatalogcanCreateSchemacanDisableConstraintscastPatterncastTypecloseQuotecolumnTypecontributeTypescreateVersioncurrentTimestampdatetimeFormatdropConstraintsextractPatterngetAddForeignKeyConstraintStringgetAlterColumnTypeStringgetCharacterSetBytesPerCharactergetColumnCommentgetCreateCatalogCommandgetCreateSchemaCommandgetCurrentTimestampSelectStringgetDefaultLobLengthgetDefaultMySQLStorageEnginegetDisableConstraintsStatementgetDropCatalogCommandgetDropForeignKeyStringgetDropSchemaCommandgetDropUniqueKeyStringgetEnableConstraintsStatementgetEnumTypeDeclarationgetFallbackSqmInsertStrategygetFallbackSqmMutationStrategygetFloatPrecisiongetForUpdateSkipLockedStringgetForUpdateSkipLockedStringgetForUpdateStringgetFractionalSecondPrecisionInNanosgetGroupBySelectItemReferenceStrategygetIdentityColumnSupportgetLimitHandlergetMaxAliasLengthgetMaxIdentifierLengthgetMaxVarbinaryLengthgetMaxVarcharLengthgetNameQualifierSupportgetNullColumnStringgetNullOrderinggetPreferredSqlTypeCodeForBooleangetQueryHintStringgetResultSetgetSelectGUIDStringgetSizeStrategygetSupportedTemporaryTableKindgetTableCommentgetTableTypeStringgetTemporaryTableAfterUseActiongetTemporaryTableBeforeUseActiongetTemporaryTableCreateCommandgetTemporaryTableDropCommandgetViolatedConstraintNameExtractorgetWriteLockStringgetWriteRowLockStrategyhasSelfReferentialForeignKeyBuginitDefaultPropertiesinitializeFunctionRegistryisCurrentTimestampSelectStringCallableisJdbcLogWarningsEnabledByDefaultisNoBackslashEscapesEnabledopenQuotequalifyIndexNameregisterColumnTypesregisterResultSetOutParameterresolveSqlTypeDescriptorsupportsAlterColumnTypesupportsColumnChecksupportsCommentOnsupportsCurrentTimestampSelectionsupportsIfExistsBeforeTableNamesupportsIsTruesupportsLateralsupportsLobValueChangePropagationsupportsLockTimeoutssupportsNullPrecedencesupportsOffsetInSubquerysupportsSubqueryOnMutatingTablesupportsTemporalLiteralOffsetsupportsWindowFunctionstimestampaddPatterntimestampdiffPatternuseMaterializedLobWhenCapacityExceeded

Field Detail

MINIMUM_VERSIONback to summary
private static final DatabaseVersion MINIMUM_VERSION

Hides org.hibernate.dialect.MySQLDialect.MINIMUM_VERSION.

VERSION57back to summary
private static final DatabaseVersion VERSION57

Constructor Detail

TiDBDialectback to summary
public TiDBDialect()
TiDBDialectback to summary
public TiDBDialect(DatabaseVersion version)
TiDBDialectback to summary
public TiDBDialect(DialectResolutionInfo info)

Method Detail

getForUpdateNowaitStringback to summary
public String getForUpdateNowaitString()

Overrides org.hibernate.dialect.MySQLDialect.getForUpdateNowaitString.

Doc from org.hibernate.dialect.Dialect.getForUpdateNowaitString.

Retrieves the FOR UPDATE NOWAIT syntax specific to this dialect.

Returns:String

The appropriate FOR UPDATE NOWAIT clause string.

Annotations
@Override
getForUpdateNowaitStringback to summary
public String getForUpdateNowaitString(String aliases)

Overrides org.hibernate.dialect.MySQLDialect.getForUpdateNowaitString.

Doc from org.hibernate.dialect.Dialect.getForUpdateNowaitString.

Get the FOR UPDATE OF column_list NOWAIT fragment appropriate for this dialect, given the aliases of the columns to be write locked.

Parameters
aliases:String

The columns to be write locked.

Returns:String

The appropriate FOR UPDATE OF colunm_list NOWAIT clause string.

Annotations
@Override
getFunctionalDependencyAnalysisSupportback to summary
public FunctionalDependencyAnalysisSupport getFunctionalDependencyAnalysisSupport()

Overrides org.hibernate.dialect.MySQLDialect.getFunctionalDependencyAnalysisSupport.

Doc from org.hibernate.dialect.Dialect.getFunctionalDependencyAnalysisSupport.

Get this dialect's level of support for primary key functional dependency analysis within GROUP BY and ORDER BY clauses.

Annotations
@Override
getMinimumSupportedVersionback to summary
protected DatabaseVersion getMinimumSupportedVersion()

Overrides org.hibernate.dialect.MySQLDialect.getMinimumSupportedVersion.

Doc from org.hibernate.dialect.Dialect.getMinimumSupportedVersion.

Get the version of the SQL dialect that is the minimum supported by this implementation.

Annotations
@Override
getMySQLVersionback to summary
public DatabaseVersion getMySQLVersion()

Overrides org.hibernate.dialect.MySQLDialect.getMySQLVersion.

Annotations
@Override
getQuerySequencesStringback to summary
public String getQuerySequencesString()

Overrides org.hibernate.dialect.Dialect.getQuerySequencesString.

Doc from org.hibernate.dialect.Dialect.getQuerySequencesString.

Get the select command used retrieve the names of all sequences.

Returns:String

The select command; or null if sequences are not supported.

Annotations
@Override
getReadLockStringback to summary
public String getReadLockString(int timeout)

Overrides org.hibernate.dialect.MySQLDialect.getReadLockString.

Doc from org.hibernate.dialect.Dialect.getReadLockString.

Get 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().

Parameters
timeout:int

in milliseconds, -1 for indefinite wait and 0 for no wait.

Returns:String

The appropriate LOCK clause string.

Annotations
@Override
getReadLockStringback to summary
public String getReadLockString(String aliases, int timeout)

Overrides org.hibernate.dialect.MySQLDialect.getReadLockString.

Doc from org.hibernate.dialect.Dialect.getReadLockString.

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.

Location of the returned string is treated the same as getForUpdateString().

Parameters
aliases:String

The columns to be read locked.

timeout:int

in milliseconds, -1 for indefinite wait and 0 for no wait.

Returns:String

The appropriate LOCK clause string.

Annotations
@Override
getSequenceInformationExtractorback to summary
public SequenceInformationExtractor getSequenceInformationExtractor()

Overrides org.hibernate.dialect.Dialect.getSequenceInformationExtractor.

Doc from org.hibernate.dialect.Dialect.getSequenceInformationExtractor.

A SequenceInformationExtractor which is able to extract org.hibernate.tool.schema.extract.spi.SequenceInformation from the JDBC result set returned when getQuerySequencesString() is executed.

Annotations
@Override
getSequenceSupportback to summary
public SequenceSupport getSequenceSupport()

Overrides org.hibernate.dialect.MySQLDialect.getSequenceSupport.

Doc from org.hibernate.dialect.MySQLDialect.getSequenceSupport.

No support for sequences.

Annotations
@Override
getSqlAstTranslatorFactoryback to summary
public SqlAstTranslatorFactory getSqlAstTranslatorFactory()

Overrides org.hibernate.dialect.MySQLDialect.getSqlAstTranslatorFactory.

Doc from org.hibernate.dialect.Dialect.getSqlAstTranslatorFactory.

Return a SqlAstTranslatorFactory specific to this dialect, or null to use the standard translator.

Annotations
@Override
getWriteLockStringback to summary
public String getWriteLockString(int timeout)

Overrides org.hibernate.dialect.MySQLDialect.getWriteLockString.

Doc from org.hibernate.dialect.Dialect.getWriteLockString.

Get the string to append to SELECT statements to acquire pessimistic WRITE locks for this dialect.

Location of the returned string is treated the same as getForUpdateString().

Parameters
timeout:int

in milliseconds, -1 for indefinite wait and 0 for no wait.

Returns:String

The appropriate LOCK clause string.

Annotations
@Override
registerDefaultKeywordsback to summary
protected void registerDefaultKeywords()

Overrides org.hibernate.dialect.MySQLDialect.registerDefaultKeywords.

Doc from org.hibernate.dialect.Dialect.registerDefaultKeywords.

Register the reserved words of ANSI-standard SQL as keywords.

Annotations
@Override
supportsAliasLocksback to summary
pack-priv boolean supportsAliasLocks()

Overrides org.hibernate.dialect.MySQLDialect.supportsAliasLocks.

Annotations
@Override
supportsCascadeDeleteback to summary
public boolean supportsCascadeDelete()

Overrides org.hibernate.dialect.MySQLDialect.supportsCascadeDelete.

Doc from org.hibernate.dialect.Dialect.supportsCascadeDelete.

Does this dialect support on delete actions in foreign key definitions?

Returns:boolean

true if the dialect does support the on delete clause.

Annotations
@Override
supportsForShareback to summary
pack-priv boolean supportsForShare()

Overrides org.hibernate.dialect.MySQLDialect.supportsForShare.

Annotations
@Override
supportsNoWaitback to summary
public boolean supportsNoWait()

Overrides org.hibernate.dialect.MySQLDialect.supportsNoWait.

Doc from org.hibernate.dialect.Dialect.supportsNoWait.

Does this dialect support NO_WAIT timeout.

Returns:boolean

true if NO_WAIT is supported

Annotations
@Override
supportsRecursiveCTEback to summary
public boolean supportsRecursiveCTE()

Overrides org.hibernate.dialect.MySQLDialect.supportsRecursiveCTE.

Doc from org.hibernate.dialect.Dialect.supportsRecursiveCTE.

Does this dialect/database support recursive CTEs?

Returns:boolean

true if recursive CTEs are supported

Annotations
@Override
supportsSkipLockedback to summary
public boolean supportsSkipLocked()

Overrides org.hibernate.dialect.MySQLDialect.supportsSkipLocked.

Doc from org.hibernate.dialect.Dialect.supportsSkipLocked.

Does this dialect support SKIP_LOCKED timeout.

Returns:boolean

true if SKIP_LOCKED is supported

Annotations
@Override
supportsWaitback to summary
public boolean supportsWait()

Overrides org.hibernate.dialect.MySQLDialect.supportsWait.

Doc from org.hibernate.dialect.Dialect.supportsWait.

Does this dialect support WAIT timeout.

Returns:boolean

true if WAIT is supported

Annotations
@Override