Class 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, LEGACY_LOB_MERGE_STRATEGY, LOG_BASE2OF10, NEW_LOCATOR_LOB_MERGE_STRATEGY, QUOTE, STANDARD_MULTI_KEY_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGY
    • Constructor Summary

      Constructors 
      Constructor Description
      CUBRIDDialect()
      Constructs a CUBRIDDialect
      CUBRIDDialect​(org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo info)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void appendDatetimeFormat​(org.hibernate.sql.ast.spi.SqlAppender appender, String format)  
      char closeQuote()  
      protected String columnType​(int sqlTypeCode)  
      String extractPattern​(org.hibernate.query.sqm.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().
      String getCurrentTimestampSelectString()  
      int getDefaultStatementBatchSize()  
      int getDefaultTimestampPrecision()  
      String getDropForeignKeyString()  
      String getDropUniqueKeyString()  
      int getFloatPrecision()  
      String getForUpdateString()  
      long getFractionalSecondPrecisionInNanos()  
      org.hibernate.dialect.identity.IdentityColumnSupport getIdentityColumnSupport()  
      org.hibernate.dialect.pagination.LimitHandler getLimitHandler()  
      int getMaxVarbinaryLength()  
      int getMaxVarcharLength()  
      int getPreferredSqlTypeCodeForBoolean()  
      String getQuerySequencesString()  
      org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor getSequenceInformationExtractor()  
      org.hibernate.dialect.sequence.SequenceSupport getSequenceSupport()  
      org.hibernate.sql.ast.SqlAstTranslatorFactory getSqlAstTranslatorFactory()  
      org.hibernate.dialect.TimeZoneSupport getTimeZoneSupport()  
      void initializeFunctionRegistry​(org.hibernate.boot.model.FunctionContributions functionContributions)  
      boolean isCurrentTimestampSelectStringCallable()  
      char openQuote()  
      boolean qualifyIndexName()  
      protected void registerColumnTypes​(org.hibernate.boot.model.TypeContributions typeContributions, org.hibernate.service.ServiceRegistry serviceRegistry)  
      protected void registerDefaultKeywords()  
      org.hibernate.type.descriptor.jdbc.JdbcType resolveSqlTypeDescriptor​(String columnTypeName, int jdbcTypeCode, int precision, int scale, org.hibernate.type.descriptor.jdbc.spi.JdbcTypeRegistry jdbcTypeRegistry)  
      boolean supportsColumnCheck()  
      boolean supportsCurrentTimestampSelection()  
      boolean supportsExistsInSelect()  
      boolean supportsIfExistsBeforeTableName()  
      boolean supportsOffsetInSubquery()  
      boolean supportsPartitionBy()  
      boolean supportsTemporaryTables()  
      boolean supportsTupleDistinctCounts()  
      String timestampaddPattern​(org.hibernate.query.sqm.TemporalUnit unit, TemporalType temporalType, org.hibernate.query.sqm.IntervalType intervalType)  
      String timestampdiffPattern​(org.hibernate.query.sqm.TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType)  
      • Methods inherited from class org.hibernate.dialect.Dialect

        addSqlHintOrComment, appendArrayLiteral, appendBinaryLiteral, appendBooleanValueString, appendDateTimeLiteral, appendDateTimeLiteral, appendDateTimeLiteral, appendIntervalLiteral, appendLiteral, appendLockHint, appendUUIDLiteral, applyLocksToSql, augmentPhysicalTableTypes, augmentRecognizedTableTypes, buildIdentifierHelper, buildSQLExceptionConversionDelegate, canBatchTruncate, canCreateCatalog, canCreateSchema, canDisableConstraints, castPattern, castType, checkVersion, contribute, contributeFunctions, contributeTypes, createOptionalTableUpdateOperation, currentDate, currentLocalTime, currentLocalTimestamp, currentTime, currentTimestamp, currentTimestampWithTimeZone, defaultScrollMode, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, dropConstraints, equivalentTypes, escapeComment, forceLobAsLastValue, generatedAs, getAddColumnString, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAggregateSupport, getAlterColumnTypeString, getAlterTableString, getArrayTypeName, getAuxiliaryDatabaseObjectExporter, getBatchLoadSizingStrategy, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getCheckCondition, getCheckCondition, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateIndexString, getCreateIndexTail, getCreateMultisetTableString, getCreateSchemaCommand, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCreateUserDefinedTypeExtensionsString, getCreateUserDefinedTypeKindString, getCurrentSchemaCommand, getDefaultDecimalPrecision, getDefaultLobLength, getDefaultNonContextualLobCreation, getDefaultProperties, getDefaultUseGetGeneratedKeys, getDisableConstraintsStatement, getDisableConstraintStatement, getDmlTargetColumnQualifierSupport, getDoublePrecision, getDropCatalogCommand, getDropSchemaCommand, getDropTableString, getEnableConstraintsStatement, getEnableConstraintStatement, getEnumTypeDeclaration, getFallbackSchemaManagementTool, getFallbackSqmInsertStrategy, getFallbackSqmMutationStrategy, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getGroupBySelectItemReferenceStrategy, getHqlTranslator, getIndexExporter, getInExpressionCountLimit, getKeywords, getLobMergeStrategy, getLockingStrategy, getLockRowIdentifier, getLowercaseFunction, getMaxAliasLength, getMaxIdentifierLength, getMaxNVarcharCapacity, getMaxNVarcharLength, getMaxVarbinaryCapacity, getMaxVarcharCapacity, getMinimumSupportedVersion, getMultiKeyLoadSizingStrategy, getNameQualifierSupport, getNationalizationSupport, getNativeIdentifierGenerationType, getNativeIdentifierGeneratorStrategy, getNativeParameterMarkerStrategy, getNoColumnsInsertString, getNullColumnString, getNullColumnString, getNullOrdering, getParameterCountLimit, getPreferredSqlTypeCodeForArray, getQueryHintString, getQueryHintString, getReadLockString, getReadLockString, getReadRowLockStrategy, getResultSet, getResultSet, getResultSet, getRowIdColumnString, getSchemaNameResolver, 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, getWriteRowLockStrategy, hasAlterTable, hasDataTypeBeforeGeneratedAs, hasSelfReferentialForeignKeyBug, initDefaultProperties, inlineLiteral, isAnsiNullOn, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLob, isLockTimeoutParameterized, ordinal, prependComment, quote, registerKeyword, registerKeywords, registerResultSetOutParameter, registerResultSetOutParameter, requiresCastForConcatenatingNonStrings, requiresFloatCastingOfIntegerDivision, requiresParensForTupleCounts, requiresParensForTupleDistinctCounts, resolveSqlTypeCode, resolveSqlTypeCode, resolveSqlTypeLength, rowId, rowIdSqlType, supportsAlterColumnType, supportsBindAsCallableArgument, supportsBitType, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsCommentOn, supportsDistinctFromPredicate, supportsExpectedLobUsagePattern, supportsFetchClause, supportsFractionalTimestampArithmetic, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsAfterTypeName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTypeName, supportsInsertReturning, supportsInsertReturningGeneratedKeys, supportsJdbcConnectionLobCreation, supportsLateral, supportsLobValueChangePropagation, supportsLockTimeouts, supportsMaterializedLobAccess, supportsNamedParameters, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNoWait, supportsNullPrecedence, supportsOrderByInSubquery, supportsOrdinalSelectItemReference, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPredicateAsExpression, supportsRecursiveCTE, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsSkipLocked, supportsStandardArrays, supportsStandardCurrentTimestampFunction, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTemporalLiteralOffset, supportsTemporaryTablePrimaryKey, supportsTruncateWithCast, supportsTupleCounts, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnionInSubquery, supportsValuesList, supportsValuesListForInsert, supportsWait, supportsWindowFunctions, toBooleanValueString, toQuotedIdentifier, toString, transformSelectString, translateDurationField, translateExtractField, trimPattern, useArrayForMultiValuedParameters, useFollowOnLocking, useInputStreamToInsertBlob, useMaterializedLobWhenCapacityExceeded
    • Constructor Detail

      • CUBRIDDialect

        public CUBRIDDialect()
        Constructs a CUBRIDDialect
      • CUBRIDDialect

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

      • 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
      • 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.sqm.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.sqm.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.sqm.TemporalUnit unit,
                                           TemporalType fromTemporalType,
                                           TemporalType toTemporalType)
        Overrides:
        timestampdiffPattern in class org.hibernate.dialect.Dialect