Package org.hibernate.community.dialect
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.DialectAn SQL dialect for CUBRID (8.3.x and later).
-
-
Constructor Summary
Constructors Constructor Description CUBRIDDialect()Constructs a CUBRIDDialectCUBRIDDialect(org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo info)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendDatetimeFormat(org.hibernate.sql.ast.spi.SqlAppender appender, String format)charcloseQuote()protected StringcolumnType(int sqlTypeCode)StringextractPattern(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().StringgetCurrentTimestampSelectString()intgetDefaultStatementBatchSize()intgetDefaultTimestampPrecision()StringgetDropForeignKeyString()StringgetDropUniqueKeyString()intgetFloatPrecision()StringgetForUpdateString()longgetFractionalSecondPrecisionInNanos()org.hibernate.dialect.identity.IdentityColumnSupportgetIdentityColumnSupport()org.hibernate.dialect.pagination.LimitHandlergetLimitHandler()intgetMaxVarbinaryLength()intgetMaxVarcharLength()intgetPreferredSqlTypeCodeForBoolean()StringgetQuerySequencesString()org.hibernate.tool.schema.extract.spi.SequenceInformationExtractorgetSequenceInformationExtractor()org.hibernate.dialect.sequence.SequenceSupportgetSequenceSupport()org.hibernate.sql.ast.SqlAstTranslatorFactorygetSqlAstTranslatorFactory()org.hibernate.dialect.TimeZoneSupportgetTimeZoneSupport()voidinitializeFunctionRegistry(org.hibernate.boot.model.FunctionContributions functionContributions)booleanisCurrentTimestampSelectStringCallable()charopenQuote()booleanqualifyIndexName()protected voidregisterColumnTypes(org.hibernate.boot.model.TypeContributions typeContributions, org.hibernate.service.ServiceRegistry serviceRegistry)protected voidregisterDefaultKeywords()org.hibernate.type.descriptor.jdbc.JdbcTyperesolveSqlTypeDescriptor(String columnTypeName, int jdbcTypeCode, int precision, int scale, org.hibernate.type.descriptor.jdbc.spi.JdbcTypeRegistry jdbcTypeRegistry)booleansupportsColumnCheck()booleansupportsCurrentTimestampSelection()booleansupportsExistsInSelect()booleansupportsIfExistsBeforeTableName()booleansupportsOffsetInSubquery()booleansupportsPartitionBy()booleansupportsTemporaryTables()booleansupportsTupleDistinctCounts()StringtimestampaddPattern(org.hibernate.query.sqm.TemporalUnit unit, TemporalType temporalType, org.hibernate.query.sqm.IntervalType intervalType)StringtimestampdiffPattern(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
-
-
-
-
Method Detail
-
columnType
protected String columnType(int sqlTypeCode)
- Overrides:
columnTypein classorg.hibernate.dialect.Dialect
-
registerColumnTypes
protected void registerColumnTypes(org.hibernate.boot.model.TypeContributions typeContributions, org.hibernate.service.ServiceRegistry serviceRegistry)- Overrides:
registerColumnTypesin classorg.hibernate.dialect.Dialect
-
registerDefaultKeywords
protected void registerDefaultKeywords()
- Overrides:
registerDefaultKeywordsin classorg.hibernate.dialect.Dialect
-
getDefaultStatementBatchSize
public int getDefaultStatementBatchSize()
- Overrides:
getDefaultStatementBatchSizein classorg.hibernate.dialect.Dialect
-
getMaxVarcharLength
public int getMaxVarcharLength()
- Overrides:
getMaxVarcharLengthin classorg.hibernate.dialect.Dialect
-
getMaxVarbinaryLength
public int getMaxVarbinaryLength()
- Overrides:
getMaxVarbinaryLengthin classorg.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:
resolveSqlTypeDescriptorin classorg.hibernate.dialect.Dialect
-
getPreferredSqlTypeCodeForBoolean
public int getPreferredSqlTypeCodeForBoolean()
- Overrides:
getPreferredSqlTypeCodeForBooleanin classorg.hibernate.dialect.Dialect
-
getDefaultTimestampPrecision
public int getDefaultTimestampPrecision()
- Overrides:
getDefaultTimestampPrecisionin classorg.hibernate.dialect.Dialect
-
getFloatPrecision
public int getFloatPrecision()
- Overrides:
getFloatPrecisionin classorg.hibernate.dialect.Dialect
-
initializeFunctionRegistry
public void initializeFunctionRegistry(org.hibernate.boot.model.FunctionContributions functionContributions)
- Overrides:
initializeFunctionRegistryin classorg.hibernate.dialect.Dialect
-
supportsColumnCheck
public boolean supportsColumnCheck()
- Overrides:
supportsColumnCheckin classorg.hibernate.dialect.Dialect
-
getSequenceSupport
public org.hibernate.dialect.sequence.SequenceSupport getSequenceSupport()
- Overrides:
getSequenceSupportin classorg.hibernate.dialect.Dialect
-
getDropForeignKeyString
public String getDropForeignKeyString()
- Overrides:
getDropForeignKeyStringin classorg.hibernate.dialect.Dialect
-
getDropUniqueKeyString
public String getDropUniqueKeyString()
- Overrides:
getDropUniqueKeyStringin classorg.hibernate.dialect.Dialect
-
qualifyIndexName
public boolean qualifyIndexName()
- Overrides:
qualifyIndexNamein classorg.hibernate.dialect.Dialect
-
supportsExistsInSelect
public boolean supportsExistsInSelect()
- Overrides:
supportsExistsInSelectin classorg.hibernate.dialect.Dialect
-
getQuerySequencesString
public String getQuerySequencesString()
- Overrides:
getQuerySequencesStringin classorg.hibernate.dialect.Dialect
-
getSequenceInformationExtractor
public org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor getSequenceInformationExtractor()
- Overrides:
getSequenceInformationExtractorin classorg.hibernate.dialect.Dialect
-
openQuote
public char openQuote()
- Overrides:
openQuotein classorg.hibernate.dialect.Dialect
-
closeQuote
public char closeQuote()
- Overrides:
closeQuotein classorg.hibernate.dialect.Dialect
-
getForUpdateString
public String getForUpdateString()
- Overrides:
getForUpdateStringin classorg.hibernate.dialect.Dialect
-
supportsCurrentTimestampSelection
public boolean supportsCurrentTimestampSelection()
- Overrides:
supportsCurrentTimestampSelectionin classorg.hibernate.dialect.Dialect
-
getCurrentTimestampSelectString
public String getCurrentTimestampSelectString()
- Overrides:
getCurrentTimestampSelectStringin classorg.hibernate.dialect.Dialect
-
isCurrentTimestampSelectStringCallable
public boolean isCurrentTimestampSelectStringCallable()
- Overrides:
isCurrentTimestampSelectStringCallablein classorg.hibernate.dialect.Dialect
-
supportsIfExistsBeforeTableName
public boolean supportsIfExistsBeforeTableName()
- Overrides:
supportsIfExistsBeforeTableNamein classorg.hibernate.dialect.Dialect
-
supportsTupleDistinctCounts
public boolean supportsTupleDistinctCounts()
- Overrides:
supportsTupleDistinctCountsin classorg.hibernate.dialect.Dialect
-
supportsOffsetInSubquery
public boolean supportsOffsetInSubquery()
- Overrides:
supportsOffsetInSubqueryin classorg.hibernate.dialect.Dialect
-
supportsTemporaryTables
public boolean supportsTemporaryTables()
- Overrides:
supportsTemporaryTablesin classorg.hibernate.dialect.Dialect
-
getSqlAstTranslatorFactory
public org.hibernate.sql.ast.SqlAstTranslatorFactory getSqlAstTranslatorFactory()
- Overrides:
getSqlAstTranslatorFactoryin classorg.hibernate.dialect.Dialect
-
getLimitHandler
public org.hibernate.dialect.pagination.LimitHandler getLimitHandler()
- Overrides:
getLimitHandlerin classorg.hibernate.dialect.Dialect
-
getIdentityColumnSupport
public org.hibernate.dialect.identity.IdentityColumnSupport getIdentityColumnSupport()
- Overrides:
getIdentityColumnSupportin classorg.hibernate.dialect.Dialect
-
supportsPartitionBy
public boolean supportsPartitionBy()
- Overrides:
supportsPartitionByin classorg.hibernate.dialect.Dialect
-
appendDatetimeFormat
public void appendDatetimeFormat(org.hibernate.sql.ast.spi.SqlAppender appender, String format)- Overrides:
appendDatetimeFormatin classorg.hibernate.dialect.Dialect
-
getFractionalSecondPrecisionInNanos
public long getFractionalSecondPrecisionInNanos()
- Overrides:
getFractionalSecondPrecisionInNanosin classorg.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 areTemporalUnit.DAY_OF_YEAR,TemporalUnit.DAY_OF_MONTH,TemporalUnit.DAY_OF_YEAR. In addition, the fieldTemporalUnit.SECONDis redefined to include milliseconds.- Overrides:
extractPatternin classorg.hibernate.dialect.Dialect
-
getTimeZoneSupport
public org.hibernate.dialect.TimeZoneSupport getTimeZoneSupport()
- Overrides:
getTimeZoneSupportin classorg.hibernate.dialect.Dialect
-
timestampaddPattern
public String timestampaddPattern(org.hibernate.query.sqm.TemporalUnit unit, TemporalType temporalType, org.hibernate.query.sqm.IntervalType intervalType)
- Overrides:
timestampaddPatternin classorg.hibernate.dialect.Dialect
-
timestampdiffPattern
public String timestampdiffPattern(org.hibernate.query.sqm.TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType)
- Overrides:
timestampdiffPatternin classorg.hibernate.dialect.Dialect
-
-