Class CUBRIDDialect

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

public class CUBRIDDialect extends org.hibernate.dialect.Dialect
An SQL dialect for CUBRID (8.3.x and later).
  • 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
    Constructs a CUBRIDDialect
    CUBRIDDialect(org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo info)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    appendDatetimeFormat(org.hibernate.sql.ast.spi.SqlAppender appender, String format)
     
    char
     
    protected String
    columnType(int sqlTypeCode)
     
    extractPattern(org.hibernate.query.common.TemporalUnit unit)
    CUBRID supports a limited list of temporal fields in the extract() function, but we can emulate some of them by using the appropriate named functions instead of extract().
     
    int
     
    int
     
     
     
     
    int
     
     
    long
     
     
    org.hibernate.dialect.identity.IdentityColumnSupport
     
    org.hibernate.dialect.pagination.LimitHandler
     
    org.hibernate.dialect.lock.spi.LockingSupport
     
    int
     
    int
     
    int
     
     
    org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor
     
    org.hibernate.dialect.sequence.SequenceSupport
     
    org.hibernate.sql.ast.SqlAstTranslatorFactory
     
    org.hibernate.dialect.TimeZoneSupport
     
    void
    initializeFunctionRegistry(org.hibernate.boot.model.FunctionContributions functionContributions)
     
    boolean
     
    char
     
    boolean
     
    protected void
    registerColumnTypes(org.hibernate.boot.model.TypeContributions typeContributions, org.hibernate.service.ServiceRegistry serviceRegistry)
     
    protected void
     
    org.hibernate.type.descriptor.jdbc.JdbcType
    resolveSqlTypeDescriptor(String columnTypeName, int jdbcTypeCode, int precision, int scale, org.hibernate.type.descriptor.jdbc.spi.JdbcTypeRegistry jdbcTypeRegistry)
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    timestampaddPattern(org.hibernate.query.common.TemporalUnit unit, TemporalType temporalType, org.hibernate.query.sqm.IntervalType intervalType)
     
    timestampdiffPattern(org.hibernate.query.common.TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType)
     

    Methods inherited from class org.hibernate.dialect.Dialect

    addPartitionKeyToPrimaryKey, addSqlHintOrComment, addUseIndexQueryHint, appendArrayLiteral, appendBinaryLiteral, appendBooleanValueString, appendCheckConstraintOptions, appendDateTimeLiteral, appendDateTimeLiteral, appendDateTimeLiteral, appendIntervalLiteral, appendIntervalLiteral, appendLiteral, appendLockHint, appendUUIDLiteral, applyLocksToSql, augmentPhysicalTableTypes, augmentRecognizedTableTypes, buildIdentifierHelper, buildLockingClauseStrategy, buildOptimisticForceIncrementStrategy, buildOptimisticStrategy, buildPessimisticForceIncrementStrategy, buildPessimisticReadStrategy, buildPessimisticWriteStrategy, buildReadStrategy, buildSQLExceptionConversionDelegate, buildStringToBooleanCast, buildStringToBooleanCastDecode, buildStringToBooleanDecode, canBatchTruncate, canCreateCatalog, canCreateSchema, canDisableConstraints, castPattern, castType, checkVersion, contribute, contributeFunctions, contributeTypes, createOptionalTableUpdateOperation, currentDate, currentLocalTime, currentLocalTimestamp, currentTime, currentTimestamp, currentTimestampWithTimeZone, defaultScrollMode, determineDatabaseVersion, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, doesRoundTemporalOnOverflow, dropConstraints, equivalentTypes, escapeComment, forceLobAsLastValue, generatedAs, getAddColumnString, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAggregateSupport, getAlterColumnTypeString, getAlterTableString, getArrayTypeName, getAuxiliaryDatabaseObjectExporter, getBatchLoadSizingStrategy, getBeforeDropStatement, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getCatalogSeparator, getCheckCondition, getCheckCondition, getCheckCondition, getCheckCondition, getCheckCondition, getCheckCondition, getCheckConstraintString, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateEnumTypeCommand, getCreateEnumTypeCommand, getCreateIndexString, getCreateIndexTail, getCreateMultisetTableString, getCreateSchemaCommand, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCreateUserDefinedTypeExtensionsString, getCreateUserDefinedTypeKindString, getCrossReferenceParentTableFilter, getCurrentSchemaCommand, getDefaultDecimalPrecision, getDefaultIntervalSecondScale, getDefaultLobLength, getDefaultNonContextualLobCreation, getDefaultOrdinalityColumnName, getDefaultProperties, getDefaultUseGetGeneratedKeys, getDisableConstraintsStatement, getDisableConstraintStatement, getDmlTargetColumnQualifierSupport, getDoublePrecision, getDropCatalogCommand, getDropEnumTypeCommand, getDropEnumTypeCommand, getDropSchemaCommand, getDropTableString, getEnableConstraintsStatement, getEnableConstraintStatement, getEnumTypeDeclaration, getEnumTypeDeclaration, getFallbackSchemaManagementTool, getFallbackSqmInsertStrategy, getFallbackSqmMutationStrategy, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctionalDependencyAnalysisSupport, getGlobalTemporaryTableStrategy, getGroupBySelectItemReferenceStrategy, getHqlTranslator, getIndexExporter, getInExpressionCountLimit, getKeywords, getLobMergeStrategy, getLocalTemporaryTableStrategy, getLockingClauseStrategy, getLockingStrategy, getLockingStrategy, getLockRowIdentifier, getLowercaseFunction, getMaxAliasLength, getMaxIdentifierLength, getMaxNVarcharCapacity, getMaxNVarcharLength, getMaxVarbinaryCapacity, getMaxVarcharCapacity, getMinimumSupportedVersion, getMultiKeyLoadSizingStrategy, getNameQualifierSupport, getNationalizationSupport, getNativeIdentifierGeneratorStrategy, getNativeParameterMarkerStrategy, getNativeValueGenerationStrategy, getNoColumnsInsertString, getNullColumnString, getNullColumnString, getNullOrdering, getParameterCountLimit, getPersistentTemporaryTableStrategy, getPessimisticLockStyle, getPreferredSqlTypeCodeForArray, getQueryHintString, getQueryHintString, getReadLockString, getReadLockString, getReadLockString, getReadLockString, getReadRowLockStrategy, getResultSet, getResultSet, getResultSet, getRowIdColumnString, getSchemaNameResolver, getSelectClauseNullString, getSelectClauseNullString, getSelectGUIDString, getSequenceExporter, getSizeStrategy, getSqmTranslatorFactory, getSupportedTemporaryTableKind, getTableCleaner, getTableComment, getTableExporter, getTableMigrator, getTableTypeString, getTemporaryTableAfterUseAction, getTemporaryTableBeforeUseAction, getTemporaryTableCreateCommand, getTemporaryTableCreateOptions, getTemporaryTableDdlTransactionHandling, getTemporaryTableDropCommand, getTemporaryTableExporter, getTemporaryTableTruncateCommand, getTimeoutInSeconds, getTruncateTableStatement, getTruncateTableStatements, getUniqueDelegate, getUniqueKeyExporter, getUserDefinedTypeComment, getUserDefinedTypeExporter, getVersion, getViolatedConstraintNameExtractor, getWriteLockString, getWriteLockString, getWriteLockString, getWriteLockString, getWriteRowLockStrategy, hasAlterTable, hasDataTypeBeforeGeneratedAs, hasSelfReferentialForeignKeyBug, initDefaultProperties, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLob, ordinal, prependComment, quote, quoteCollation, registerKeyword, registerKeywords, registerResultSetOutParameter, registerResultSetOutParameter, requiresCastForConcatenatingNonStrings, requiresColumnListInCreateView, requiresFloatCastingOfIntegerDivision, requiresParensForTupleCounts, requiresParensForTupleDistinctCounts, resolveSqlTypeCode, resolveSqlTypeCode, resolveSqlTypeLength, rowId, rowIdSqlType, stripsTrailingSpacesFromChar, supportsAlterColumnType, supportsArrayConstructor, supportsBatchUpdates, supportsBindAsCallableArgument, supportsBindingNullForSetObject, supportsBindingNullSqlTypeForSetNull, supportsBitType, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsCommentOn, supportsConflictClauseForInsertCTE, supportsCrossJoin, supportsDistinctFromPredicate, supportsDuplicateSelectItemsInQueryGroup, supportsExpectedLobUsagePattern, supportsFetchClause, supportsFilterClause, supportsForUpdate, supportsFractionalTimestampArithmetic, supportsFromClauseInUpdate, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsAfterTypeName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTypeName, supportsInsertReturning, supportsInsertReturningGeneratedKeys, supportsInsertReturningRowId, supportsIntersect, supportsIsTrue, supportsJdbcConnectionLobCreation, supportsJoinInMutationStatementSubquery, supportsJoinsInDelete, supportsLateral, supportsLobValueChangePropagation, supportsLockTimeouts, supportsMaterializedLobAccess, supportsNamedParameters, supportsNationalizedMethods, supportsNestedSubqueryCorrelation, supportsNestedWithClause, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNoWait, supportsNullPrecedence, supportsOrderByInSubquery, supportsOrdinalSelectItemReference, supportsOuterJoinForUpdate, supportsPredicateAsExpression, supportsRecursiveCTE, supportsRecursiveCycleClause, supportsRecursiveCycleUsingClause, supportsRecursiveSearchClause, supportsRefCursors, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowConstructor, supportsRowValueConstructorDistinctFromSyntax, supportsRowValueConstructorGtLtSyntax, supportsRowValueConstructorSyntaxInInSubQuery, supportsSimpleQueryGrouping, supportsSkipLocked, supportsStandardArrays, supportsStandardCurrentTimestampFunction, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTableOptions, supportsTemporalLiteralOffset, supportsTemporaryTablePrimaryKey, supportsTruncateWithCast, supportsTupleCounts, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnionInSubquery, supportsUpdateReturning, supportsUserDefinedTypes, supportsValuesList, supportsValuesListForInsert, supportsWait, supportsWindowFunctions, supportsWithClause, supportsWithClauseInSubquery, toBooleanValueString, toQuotedIdentifier, toString, transformSelectString, translateDurationField, translateExtractField, trimPattern, unquoteGetGeneratedKeys, useArrayForMultiValuedParameters, useConnectionToCreateLob, useCrossReferenceForeignKeys, useFollowOnLocking, useInputStreamToInsertBlob, useMaterializedLobWhenCapacityExceeded

    Methods inherited from class java.lang.Object

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

    • CUBRIDDialect

      public CUBRIDDialect()
      Constructs a CUBRIDDialect
    • CUBRIDDialect

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

    • columnType

      protected String columnType(int sqlTypeCode)
      Overrides:
      columnType in class org.hibernate.dialect.Dialect
    • registerColumnTypes

      protected void registerColumnTypes(org.hibernate.boot.model.TypeContributions typeContributions, org.hibernate.service.ServiceRegistry serviceRegistry)
      Overrides:
      registerColumnTypes in class org.hibernate.dialect.Dialect
    • registerDefaultKeywords

      protected void registerDefaultKeywords()
      Overrides:
      registerDefaultKeywords in class org.hibernate.dialect.Dialect
    • getDefaultStatementBatchSize

      public int getDefaultStatementBatchSize()
      Overrides:
      getDefaultStatementBatchSize in class org.hibernate.dialect.Dialect
    • getMaxVarcharLength

      public int getMaxVarcharLength()
      Overrides:
      getMaxVarcharLength in class org.hibernate.dialect.Dialect
    • getMaxVarbinaryLength

      public int getMaxVarbinaryLength()
      Overrides:
      getMaxVarbinaryLength in class org.hibernate.dialect.Dialect
    • resolveSqlTypeDescriptor

      public org.hibernate.type.descriptor.jdbc.JdbcType resolveSqlTypeDescriptor(String columnTypeName, int jdbcTypeCode, int precision, int scale, org.hibernate.type.descriptor.jdbc.spi.JdbcTypeRegistry jdbcTypeRegistry)
      Overrides:
      resolveSqlTypeDescriptor in class org.hibernate.dialect.Dialect
    • getPreferredSqlTypeCodeForBoolean

      public int getPreferredSqlTypeCodeForBoolean()
      Overrides:
      getPreferredSqlTypeCodeForBoolean in class org.hibernate.dialect.Dialect
    • getDefaultTimestampPrecision

      public int getDefaultTimestampPrecision()
      Overrides:
      getDefaultTimestampPrecision in class org.hibernate.dialect.Dialect
    • getFloatPrecision

      public int getFloatPrecision()
      Overrides:
      getFloatPrecision in class org.hibernate.dialect.Dialect
    • initializeFunctionRegistry

      public void initializeFunctionRegistry(org.hibernate.boot.model.FunctionContributions functionContributions)
      Overrides:
      initializeFunctionRegistry in class org.hibernate.dialect.Dialect
    • supportsColumnCheck

      public boolean supportsColumnCheck()
      Overrides:
      supportsColumnCheck in class org.hibernate.dialect.Dialect
    • getSequenceSupport

      public org.hibernate.dialect.sequence.SequenceSupport getSequenceSupport()
      Overrides:
      getSequenceSupport in class org.hibernate.dialect.Dialect
    • getDropForeignKeyString

      public String getDropForeignKeyString()
      Overrides:
      getDropForeignKeyString in class org.hibernate.dialect.Dialect
    • getDropUniqueKeyString

      public String getDropUniqueKeyString()
      Overrides:
      getDropUniqueKeyString in class org.hibernate.dialect.Dialect
    • qualifyIndexName

      public boolean qualifyIndexName()
      Overrides:
      qualifyIndexName in class org.hibernate.dialect.Dialect
    • supportsExistsInSelect

      public boolean supportsExistsInSelect()
      Overrides:
      supportsExistsInSelect in class org.hibernate.dialect.Dialect
    • getQuerySequencesString

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

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

      public char openQuote()
      Overrides:
      openQuote in class org.hibernate.dialect.Dialect
    • closeQuote

      public char closeQuote()
      Overrides:
      closeQuote in class org.hibernate.dialect.Dialect
    • getLockingSupport

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

      public String getForUpdateString()
      Overrides:
      getForUpdateString in class org.hibernate.dialect.Dialect
    • supportsCurrentTimestampSelection

      public boolean supportsCurrentTimestampSelection()
      Overrides:
      supportsCurrentTimestampSelection in class org.hibernate.dialect.Dialect
    • getCurrentTimestampSelectString

      public String getCurrentTimestampSelectString()
      Overrides:
      getCurrentTimestampSelectString in class org.hibernate.dialect.Dialect
    • isCurrentTimestampSelectStringCallable

      public boolean isCurrentTimestampSelectStringCallable()
      Overrides:
      isCurrentTimestampSelectStringCallable in class org.hibernate.dialect.Dialect
    • supportsIfExistsBeforeTableName

      public boolean supportsIfExistsBeforeTableName()
      Overrides:
      supportsIfExistsBeforeTableName in class org.hibernate.dialect.Dialect
    • supportsTupleDistinctCounts

      public boolean supportsTupleDistinctCounts()
      Overrides:
      supportsTupleDistinctCounts in class org.hibernate.dialect.Dialect
    • supportsOffsetInSubquery

      public boolean supportsOffsetInSubquery()
      Overrides:
      supportsOffsetInSubquery in class org.hibernate.dialect.Dialect
    • supportsTemporaryTables

      public boolean supportsTemporaryTables()
      Overrides:
      supportsTemporaryTables in class org.hibernate.dialect.Dialect
    • getSqlAstTranslatorFactory

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

      public org.hibernate.dialect.pagination.LimitHandler getLimitHandler()
      Overrides:
      getLimitHandler in class org.hibernate.dialect.Dialect
    • getIdentityColumnSupport

      public org.hibernate.dialect.identity.IdentityColumnSupport getIdentityColumnSupport()
      Overrides:
      getIdentityColumnSupport in class org.hibernate.dialect.Dialect
    • supportsPartitionBy

      public boolean supportsPartitionBy()
      Overrides:
      supportsPartitionBy in class org.hibernate.dialect.Dialect
    • appendDatetimeFormat

      public void appendDatetimeFormat(org.hibernate.sql.ast.spi.SqlAppender appender, String format)
      Overrides:
      appendDatetimeFormat in class org.hibernate.dialect.Dialect
    • getFractionalSecondPrecisionInNanos

      public long getFractionalSecondPrecisionInNanos()
      Overrides:
      getFractionalSecondPrecisionInNanos in class org.hibernate.dialect.Dialect
    • extractPattern

      public String extractPattern(org.hibernate.query.common.TemporalUnit unit)
      CUBRID supports a limited list of temporal fields in the extract() function, but we can emulate some of them by using the appropriate named functions instead of extract(). Thus, the additional supported fields are TemporalUnit.DAY_OF_YEAR, TemporalUnit.DAY_OF_MONTH, TemporalUnit.DAY_OF_YEAR. In addition, the field TemporalUnit.SECOND is redefined to include milliseconds.
      Overrides:
      extractPattern in class org.hibernate.dialect.Dialect
    • getTimeZoneSupport

      public org.hibernate.dialect.TimeZoneSupport getTimeZoneSupport()
      Overrides:
      getTimeZoneSupport in class org.hibernate.dialect.Dialect
    • 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.Dialect
    • timestampdiffPattern

      public String timestampdiffPattern(org.hibernate.query.common.TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType)
      Overrides:
      timestampdiffPattern in class org.hibernate.dialect.Dialect
    • getDual

      public String getDual()
      Overrides:
      getDual in class org.hibernate.dialect.Dialect
    • getFromDualForSelectOnly

      public String getFromDualForSelectOnly()
      Overrides:
      getFromDualForSelectOnly in class org.hibernate.dialect.Dialect
    • supportsRowValueConstructorSyntax

      public boolean supportsRowValueConstructorSyntax()
      Overrides:
      supportsRowValueConstructorSyntax in class org.hibernate.dialect.Dialect
    • supportsRowValueConstructorSyntaxInQuantifiedPredicates

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

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