Class TiDBDialect

java.lang.Object
org.hibernate.dialect.Dialect
org.hibernate.dialect.MySQLDialect
org.hibernate.community.dialect.TiDBDialect
All Implemented Interfaces:
org.hibernate.boot.model.FunctionContributor, org.hibernate.boot.model.TypeContributor, org.hibernate.exception.spi.ConversionContext

public class TiDBDialect extends org.hibernate.dialect.MySQLDialect
A SQL dialect for TiDB.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.hibernate.dialect.Dialect

    org.hibernate.dialect.Dialect.SizeStrategy, org.hibernate.dialect.Dialect.SizeStrategyImpl
  • Field Summary

    Fields inherited from class org.hibernate.dialect.Dialect

    CLOSED_QUOTE, FALSE_STRING_VALUES, LEGACY_LOB_MERGE_STRATEGY, LOG_BASE2OF10, NEW_LOCATOR_LOB_MERGE_STRATEGY, QUOTE, STANDARD_MULTI_KEY_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGY, TRUE_STRING_VALUES
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    TiDBDialect(org.hibernate.dialect.DatabaseVersion version)
     
    TiDBDialect(org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo info)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.hibernate.dialect.aggregate.AggregateSupport
     
     
     
     
    org.hibernate.dialect.FunctionalDependencyAnalysisSupport
     
    org.hibernate.dialect.lock.spi.LockingSupport
     
    protected org.hibernate.dialect.DatabaseVersion
     
    org.hibernate.dialect.DatabaseVersion
     
     
    getReadLockString(int timeout)
     
     
    getReadLockString(String aliases, int timeout)
     
    getReadLockString(String aliases, Timeout timeout)
     
    org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor
     
    org.hibernate.dialect.sequence.SequenceSupport
     
    org.hibernate.sql.ast.SqlAstTranslatorFactory
     
    getWriteLockString(int timeout)
     
     
    protected void
     
    protected boolean
     
    boolean
     
    protected boolean
     
    boolean
     
    boolean
     
    timestampaddPattern(org.hibernate.query.common.TemporalUnit unit, TemporalType temporalType, org.hibernate.query.sqm.IntervalType intervalType)
     

    Methods inherited from class org.hibernate.dialect.MySQLDialect

    addPartitionKeyToPrimaryKey, appendBooleanValueString, appendCheckConstraintOptions, appendDatetimeFormat, appendDateTimeLiteral, appendDateTimeLiteral, appendDateTimeLiteral, appendLiteral, buildIdentifierHelper, buildSQLExceptionConversionDelegate, canCreateCatalog, canCreateSchema, canDisableConstraints, castPattern, castType, closeQuote, columnType, contributeTypes, createOptionalTableUpdateOperation, createVersion, createVersion, currentTimestamp, datetimeFormat, dropConstraints, extractPattern, getAddForeignKeyConstraintString, getAlterColumnTypeString, getCharacterSetBytesPerCharacter, getColumnComment, getCreateCatalogCommand, getCreateSchemaCommand, getCurrentTimestampSelectString, getDefaultLobLength, getDefaultMySQLStorageEngine, getDisableConstraintsStatement, getDmlTargetColumnQualifierSupport, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropUniqueKeyString, getEnableConstraintsStatement, getEnumTypeDeclaration, getFallbackSqmInsertStrategy, getFallbackSqmMutationStrategy, getFloatPrecision, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getFractionalSecondPrecisionInNanos, getGroupBySelectItemReferenceStrategy, getIdentityColumnSupport, getInformationExtractor, getLimitHandler, getLocalTemporaryTableStrategy, getMaxAliasLength, getMaxIdentifierLength, getMaximumSeriesSize, getMaxVarbinaryLength, getMaxVarcharLength, getNameQualifierSupport, getNullColumnString, getNullOrdering, getPreferredSqlTypeCodeForArray, getPreferredSqlTypeCodeForBoolean, getQueryHintString, getResultSet, getSelectGUIDString, getSizeStrategy, getSupportedTemporaryTableKind, getTableComment, getTableTypeString, getTemporaryTableAfterUseAction, getTemporaryTableBeforeUseAction, getTemporaryTableCreateCommand, getTemporaryTableDropCommand, getViolatedConstraintNameExtractor, getWriteLockString, getWriteLockString, hasSelfReferentialForeignKeyBug, initDefaultProperties, initializeFunctionRegistry, isCurrentTimestampSelectStringCallable, isJdbcLogWarningsEnabledByDefault, isNoBackslashEscapesEnabled, openQuote, qualifyIndexName, registerColumnTypes, registerResultSetOutParameter, resolveSqlTypeDescriptor, resolveSqlTypeLength, stripsTrailingSpacesFromChar, supportsAlterColumnType, supportsBindingNullSqlTypeForSetNull, supportsColumnCheck, supportsCommentOn, supportsCurrentTimestampSelection, supportsDistinctFromPredicate, supportsFromClauseInUpdate, supportsIfExistsBeforeTableName, supportsIntersect, supportsIsTrue, supportsJoinsInDelete, supportsLateral, supportsLobValueChangePropagation, supportsNestedSubqueryCorrelation, supportsNullPrecedence, supportsOffsetInSubquery, supportsPartitionBy, supportsRowValueConstructorSyntaxInQuantifiedPredicates, supportsSubqueryOnMutatingTable, supportsTemporalLiteralOffset, supportsWindowFunctions, timestampdiffPattern, useMaterializedLobWhenCapacityExceeded

    Methods inherited from class org.hibernate.dialect.Dialect

    addSqlHintOrComment, addUseIndexQueryHint, appendArrayLiteral, appendBinaryLiteral, appendIntervalLiteral, appendIntervalLiteral, appendLockHint, appendUUIDLiteral, applyLocksToSql, augmentPhysicalTableTypes, augmentRecognizedTableTypes, buildLockingClauseStrategy, buildOptimisticForceIncrementStrategy, buildOptimisticStrategy, buildPessimisticForceIncrementStrategy, buildPessimisticReadStrategy, buildPessimisticWriteStrategy, buildReadStrategy, buildStringToBooleanCast, buildStringToBooleanCastDecode, buildStringToBooleanDecode, canBatchTruncate, checkVersion, contribute, contributeFunctions, currentDate, currentLocalTime, currentLocalTimestamp, currentTime, currentTimestampWithTimeZone, defaultScrollMode, determineDatabaseVersion, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, doesRoundTemporalOnOverflow, equivalentTypes, escapeComment, forceLobAsLastValue, generatedAs, getAddColumnString, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAlterTableString, getArrayTypeName, getAuxiliaryDatabaseObjectExporter, getBatchLoadSizingStrategy, getBeforeDropStatement, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getCatalogSeparator, getCheckCondition, getCheckCondition, getCheckCondition, getCheckCondition, getCheckCondition, getCheckCondition, getCheckConstraintString, getColumnAliasExtractor, getCreateEnumTypeCommand, getCreateEnumTypeCommand, getCreateIndexString, getCreateIndexTail, getCreateMultisetTableString, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCreateUserDefinedTypeExtensionsString, getCreateUserDefinedTypeKindString, getCrossReferenceParentTableFilter, getCurrentSchemaCommand, getDefaultDecimalPrecision, getDefaultIntervalSecondScale, getDefaultNonContextualLobCreation, getDefaultOrdinalityColumnName, getDefaultProperties, getDefaultStatementBatchSize, getDefaultTimestampPrecision, getDefaultUseGetGeneratedKeys, getDisableConstraintStatement, getDoublePrecision, getDropEnumTypeCommand, getDropEnumTypeCommand, getDropTableString, getEnableConstraintStatement, getEnumTypeDeclaration, getFallbackSchemaManagementTool, getForeignKeyExporter, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFromDualForSelectOnly, getGlobalTemporaryTableStrategy, getHqlTranslator, getIndexExporter, getInExpressionCountLimit, getKeywords, getLobMergeStrategy, getLockingClauseStrategy, getLockingStrategy, getLockingStrategy, getLockRowIdentifier, getLowercaseFunction, getMaxNVarcharCapacity, getMaxNVarcharLength, getMaxVarbinaryCapacity, getMaxVarcharCapacity, getMultiKeyLoadSizingStrategy, getNationalizationSupport, getNativeIdentifierGeneratorStrategy, getNativeParameterMarkerStrategy, getNativeValueGenerationStrategy, getNoColumnsInsertString, getNullColumnString, getParameterCountLimit, getPersistentTemporaryTableStrategy, getPessimisticLockStyle, getQueryHintString, getReadRowLockStrategy, getResultSet, getResultSet, getRowIdColumnString, getSchemaNameResolver, getSelectClauseNullString, getSelectClauseNullString, getSequenceExporter, getSqmTranslatorFactory, getTableCleaner, getTableExporter, getTableMigrator, getTemporaryTableCreateOptions, getTemporaryTableDdlTransactionHandling, getTemporaryTableExporter, getTemporaryTableTruncateCommand, getTimeoutInSeconds, getTimeZoneSupport, getTruncateTableStatement, getTruncateTableStatements, getUniqueDelegate, getUniqueKeyExporter, getUserDefinedTypeComment, getUserDefinedTypeExporter, getVersion, getWriteRowLockStrategy, hasAlterTable, hasDataTypeBeforeGeneratedAs, isEmptyStringTreatedAsNull, isLob, ordinal, prependComment, quote, quoteCollation, registerKeyword, registerKeywords, registerResultSetOutParameter, requiresCastForConcatenatingNonStrings, requiresColumnListInCreateView, requiresFloatCastingOfIntegerDivision, requiresParensForTupleCounts, requiresParensForTupleDistinctCounts, resolveSqlTypeCode, resolveSqlTypeCode, rowId, rowIdSqlType, supportsArrayConstructor, supportsBatchUpdates, supportsBindAsCallableArgument, supportsBindingNullForSetObject, supportsBitType, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsConflictClauseForInsertCTE, supportsCrossJoin, supportsDuplicateSelectItemsInQueryGroup, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsFetchClause, supportsFilterClause, supportsForUpdate, supportsFractionalTimestampArithmetic, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsAfterTypeName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTypeName, supportsInsertReturning, supportsInsertReturningGeneratedKeys, supportsInsertReturningRowId, supportsJdbcConnectionLobCreation, supportsJoinInMutationStatementSubquery, supportsLockTimeouts, supportsMaterializedLobAccess, supportsNamedColumnCheck, supportsNamedParameters, supportsNationalizedMethods, supportsNestedWithClause, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNoWait, supportsOrderByInSubquery, supportsOrdinalSelectItemReference, supportsOuterJoinForUpdate, supportsPredicateAsExpression, supportsRecursiveCycleClause, supportsRecursiveCycleUsingClause, supportsRecursiveSearchClause, supportsRefCursors, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowConstructor, supportsRowValueConstructorDistinctFromSyntax, supportsRowValueConstructorGtLtSyntax, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInSubQuery, supportsSimpleQueryGrouping, supportsSkipLocked, supportsStandardArrays, supportsStandardCurrentTimestampFunction, supportsSubqueryInSelect, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTableOptions, supportsTemporaryTablePrimaryKey, supportsTemporaryTables, supportsTruncateWithCast, supportsTupleCounts, supportsTupleDistinctCounts, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnionInSubquery, supportsUpdateReturning, supportsUserDefinedTypes, supportsValuesList, supportsValuesListForInsert, supportsWait, supportsWithClause, supportsWithClauseInSubquery, toBooleanValueString, toQuotedIdentifier, toString, transformSelectString, translateDurationField, translateExtractField, trimPattern, unquoteGetGeneratedKeys, useArrayForMultiValuedParameters, useConnectionToCreateLob, useCrossReferenceForeignKeys, useFollowOnLocking, useInputStreamToInsertBlob

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • TiDBDialect

      public TiDBDialect()
    • TiDBDialect

      public TiDBDialect(org.hibernate.dialect.DatabaseVersion version)
    • TiDBDialect

      public TiDBDialect(org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo info)
  • Method Details

    • getMySQLVersion

      public org.hibernate.dialect.DatabaseVersion getMySQLVersion()
      Overrides:
      getMySQLVersion in class org.hibernate.dialect.MySQLDialect
    • getMinimumSupportedVersion

      protected org.hibernate.dialect.DatabaseVersion getMinimumSupportedVersion()
      Overrides:
      getMinimumSupportedVersion in class org.hibernate.dialect.MySQLDialect
    • registerDefaultKeywords

      protected void registerDefaultKeywords()
      Overrides:
      registerDefaultKeywords in class org.hibernate.dialect.MySQLDialect
    • supportsCascadeDelete

      public boolean supportsCascadeDelete()
      Overrides:
      supportsCascadeDelete in class org.hibernate.dialect.MySQLDialect
    • getQuerySequencesString

      public String getQuerySequencesString()
      Overrides:
      getQuerySequencesString in class org.hibernate.dialect.Dialect
    • getSequenceSupport

      public org.hibernate.dialect.sequence.SequenceSupport getSequenceSupport()
      Overrides:
      getSequenceSupport in class org.hibernate.dialect.MySQLDialect
    • getAggregateSupport

      public org.hibernate.dialect.aggregate.AggregateSupport getAggregateSupport()
      Overrides:
      getAggregateSupport in class org.hibernate.dialect.MySQLDialect
    • getSequenceInformationExtractor

      public org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor getSequenceInformationExtractor()
      Overrides:
      getSequenceInformationExtractor in class org.hibernate.dialect.Dialect
    • getSqlAstTranslatorFactory

      public org.hibernate.sql.ast.SqlAstTranslatorFactory getSqlAstTranslatorFactory()
      Overrides:
      getSqlAstTranslatorFactory in class org.hibernate.dialect.MySQLDialect
    • supportsRecursiveCTE

      public boolean supportsRecursiveCTE()
      Overrides:
      supportsRecursiveCTE in class org.hibernate.dialect.MySQLDialect
    • getLockingSupport

      public org.hibernate.dialect.lock.spi.LockingSupport getLockingSupport()
      Overrides:
      getLockingSupport in class org.hibernate.dialect.MySQLDialect
    • supportsForShare

      protected boolean supportsForShare()
      Overrides:
      supportsForShare in class org.hibernate.dialect.MySQLDialect
    • supportsAliasLocks

      protected boolean supportsAliasLocks()
      Overrides:
      supportsAliasLocks in class org.hibernate.dialect.MySQLDialect
    • supportsRowValueConstructorSyntaxInInList

      public boolean supportsRowValueConstructorSyntaxInInList()
      Overrides:
      supportsRowValueConstructorSyntaxInInList in class org.hibernate.dialect.Dialect
    • getReadLockString

      public String getReadLockString(Timeout timeout)
      Overrides:
      getReadLockString in class org.hibernate.dialect.MySQLDialect
    • getReadLockString

      public String getReadLockString(String aliases, Timeout timeout)
      Overrides:
      getReadLockString in class org.hibernate.dialect.MySQLDialect
    • getWriteLockString

      public String getWriteLockString(Timeout timeout)
      Overrides:
      getWriteLockString in class org.hibernate.dialect.MySQLDialect
    • getReadLockString

      public String getReadLockString(int timeout)
      Overrides:
      getReadLockString in class org.hibernate.dialect.MySQLDialect
    • getReadLockString

      public String getReadLockString(String aliases, int timeout)
      Overrides:
      getReadLockString in class org.hibernate.dialect.MySQLDialect
    • getWriteLockString

      public String getWriteLockString(int timeout)
      Overrides:
      getWriteLockString in class org.hibernate.dialect.MySQLDialect
    • getForUpdateNowaitString

      public String getForUpdateNowaitString()
      Overrides:
      getForUpdateNowaitString in class org.hibernate.dialect.MySQLDialect
    • getForUpdateNowaitString

      public String getForUpdateNowaitString(String aliases)
      Overrides:
      getForUpdateNowaitString in class org.hibernate.dialect.MySQLDialect
    • getFunctionalDependencyAnalysisSupport

      public org.hibernate.dialect.FunctionalDependencyAnalysisSupport getFunctionalDependencyAnalysisSupport()
      Overrides:
      getFunctionalDependencyAnalysisSupport in class org.hibernate.dialect.MySQLDialect
    • timestampaddPattern

      public String timestampaddPattern(org.hibernate.query.common.TemporalUnit unit, TemporalType temporalType, org.hibernate.query.sqm.IntervalType intervalType)
      Overrides:
      timestampaddPattern in class org.hibernate.dialect.MySQLDialect
    • getDual

      public String getDual()
      Overrides:
      getDual in class org.hibernate.dialect.MySQLDialect