Class CUBRIDDialect

  • All Implemented Interfaces:
    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, NEW_LOCATOR_LOB_MERGE_STRATEGY, QUOTE, STANDARD_DEFAULT_BATCH_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()  
      String extractPattern​(org.hibernate.query.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()  
      boolean getDefaultUseStreamsForBinary()  
      String getDropForeignKeyString()  
      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()  
      String getTypeName​(int code, org.hibernate.engine.jdbc.Size size)  
      org.hibernate.dialect.DatabaseVersion getVersion()  
      void initializeFunctionRegistry​(org.hibernate.query.spi.QueryEngine queryEngine)  
      boolean isCurrentTimestampSelectStringCallable()  
      char openQuote()  
      boolean qualifyIndexName()  
      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.TemporalUnit unit, TemporalType temporalType, org.hibernate.query.IntervalType intervalType)  
      String timestampdiffPattern​(org.hibernate.query.TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType)  
      • Methods inherited from class org.hibernate.dialect.Dialect

        addSqlHintOrComment, appendBinaryLiteral, appendBooleanValueString, appendDateTimeLiteral, appendDateTimeLiteral, appendDateTimeLiteral, appendIntervalLiteral, appendLiteral, appendLockHint, applyLocksToSql, augmentRecognizedTableTypes, beforeRegisteringColumnTypes, beforeRegisteringColumnTypes, binaryToDecimalPrecision, buildIdentifierHelper, buildSQLExceptionConversionDelegate, canCreateCatalog, canCreateSchema, castPattern, columnType, contributeTypes, currentDate, currentLocalTime, currentLocalTimestamp, currentTime, currentTimestamp, currentTimestampWithTimeZone, defaultScrollMode, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, dropConstraints, equivalentTypes, escapeComment, forceLobAsLastValue, getAddColumnString, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getBooleanCheckCondition, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCurrentSchemaCommand, getDefaultBatchLoadSizingStrategy, getDefaultDecimalPrecision, getDefaultLobLength, getDefaultNonContextualLobCreation, getDefaultProperties, getDefaultUseGetGeneratedKeys, getDoublePrecision, getDropCatalogCommand, getDropSchemaCommand, getDropTableString, getEnumCheckCondition, getFallbackSqmInsertStrategy, getFallbackSqmMutationStrategy, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getGroupBySelectItemReferenceStrategy, getHibernateTypeName, getHibernateTypeName, getHqlTranslator, getIndexExporter, getInExpressionCountLimit, getKeywords, getLobMergeStrategy, getLockingStrategy, getLockRowIdentifier, getLowercaseFunction, getMaxAliasLength, getMaxIdentifierLength, getMaxNVarcharLength, getNameQualifierSupport, getNationalizationSupport, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNullColumnString, getNullColumnString, getNullOrdering, getQueryHintString, getQueryHintString, getRawTypeName, getRawTypeName, getReadLockString, getReadLockString, getReadRowLockStrategy, getResultSet, getResultSet, getResultSet, getSchemaNameResolver, getSelectClauseNullString, getSelectGUIDString, getSequenceExporter, getSizeStrategy, getSqmTranslatorFactory, getSupportedJdbcTypeCodes, getSupportedTemporaryTableKind, getTableComment, getTableExporter, getTableTypeString, getTemporaryTableAfterUseAction, getTemporaryTableBeforeUseAction, getTemporaryTableCreateCommand, getTemporaryTableCreateOptions, getTemporaryTableDdlTransactionHandling, getTemporaryTableDropCommand, getTemporaryTableExporter, getTemporaryTableTruncateCommand, getTypeName, getTypeName, getTypeName, getUniqueDelegate, getUniqueKeyExporter, getViolatedConstraintNameExtractor, getWriteLockString, getWriteLockString, getWriteRowLockStrategy, hasAlterTable, hasSelfReferentialForeignKeyBug, initDefaultProperties, inlineLiteral, isAnsiNullOn, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLockTimeoutParameterized, isTypeNameRegistered, prependComment, quote, registerColumnType, registerColumnType, registerDefaultColumnTypes, registerDefaultColumnTypes, registerDefaultKeywords, registerHibernateType, registerHibernateType, registerHibernateTypes, registerKeyword, registerKeywords, registerResultSetOutParameter, registerResultSetOutParameter, requiresFloatCastingOfIntegerDivision, requiresParensForTupleCounts, requiresParensForTupleDistinctCounts, resolveSqlTypeLength, supportsBindAsCallableArgument, supportsBitType, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsCommentOn, supportsExpectedLobUsagePattern, supportsFetchClause, supportsFractionalTimestampArithmetic, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsJdbcConnectionLobCreation, supportsLateral, supportsLobValueChangePropagation, supportsLockTimeouts, supportsNamedParameters, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNoWait, supportsNullPrecedence, supportsOrderByInSubquery, supportsOrdinalSelectItemReference, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsSkipLocked, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTemporalLiteralOffset, supportsTemporaryTablePrimaryKey, supportsTruncateWithCast, supportsTupleCounts, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnionInSubquery, supportsValuesList, supportsValuesListForInsert, supportsWait, supportsWindowFunctions, toBooleanValueString, toString, transformSelectString, translateDurationField, translateExtractField, trimPattern, useFollowOnLocking, useInputStreamToInsertBlob
    • Constructor Detail

      • CUBRIDDialect

        public CUBRIDDialect()
        Constructs a CUBRIDDialect
      • CUBRIDDialect

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

      • getDefaultStatementBatchSize

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

        public boolean getDefaultUseStreamsForBinary()
        Overrides:
        getDefaultUseStreamsForBinary 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
      • getVersion

        public org.hibernate.dialect.DatabaseVersion getVersion()
        Overrides:
        getVersion 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
      • getTypeName

        public String getTypeName​(int code,
                                  org.hibernate.engine.jdbc.Size size)
                           throws org.hibernate.HibernateException
        Overrides:
        getTypeName in class org.hibernate.dialect.Dialect
        Throws:
        org.hibernate.HibernateException
      • getFloatPrecision

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

        public void initializeFunctionRegistry​(org.hibernate.query.spi.QueryEngine queryEngine)
        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
      • 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.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.TemporalUnit unit,
                                          TemporalType temporalType,
                                          org.hibernate.query.IntervalType intervalType)
        Overrides:
        timestampaddPattern in class org.hibernate.dialect.Dialect
      • timestampdiffPattern

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