Class SingleStoreDialect
java.lang.Object
org.hibernate.dialect.Dialect
org.hibernate.community.dialect.SingleStoreDialect
- All Implemented Interfaces:
org.hibernate.boot.model.FunctionContributor, org.hibernate.boot.model.TypeContributor, org.hibernate.exception.spi.ConversionContext
public class SingleStoreDialect
extends org.hibernate.dialect.Dialect
An SQL dialect for SingleStore.
The following are some of the key aspects and limitations of SingleStore that may affect Hibernate functionality:
- SingleStore supports two table types: COLUMNSTORE and ROWSTORE. Explicit table type can be configured by setting 'hibernate.dialect.singlestore.table_type' property. Refer to
SingleStoreDialect.SingleStoreTableTypefor details. - SingleStore has a random order for SELECT queries, which may impact the predictability of query results.
- SingleStore does not support foreign keys and referential integrity, which could affect the design of your database schema.
- The SingleStore dialect ignores unique key constraints. See
SingleStoreDialect.DoNothingUniqueDelegatefor more information. - SingleStore does not support zoned timestamps, which might require adjustments to how you handle time-related data.
- Updating primary keys in SingleStore is restricted because every primary key is also a unique key and shard key.
- SingleStore does not support the ALL/ANY clause in SQL queries.
- Sub-selects with references to outer table fields are not supported in SingleStore.
- SingleStore does not support the 'FOR UPDATE' clause for table locking with distributed joins. It's disabled by default, can be enabled by setting 'hibernate.dialect.singlestore.for_update_lock_enabled' property
SINGLE_STORE_FOR_UPDATE_LOCK_ENABLED. - The LIKE clause in SingleStore is case-insensitive, which might differ from other SQL implementations.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe default table type in SingleStore is 'columnstore'.Nested classes/interfaces declared in class org.hibernate.dialect.Dialect
org.hibernate.dialect.Dialect.SizeStrategy, org.hibernate.dialect.Dialect.SizeStrategyImpl -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSpecifies SingleStore FOR UPDATE clause lock enable.static final StringSpecifies SingleStore explicit table type.Fields declared in 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
ConstructorsConstructorDescriptionSingleStoreDialect(org.hibernate.dialect.DatabaseVersion version, SingleStoreDialect.SingleStoreTableType explicitTableType, boolean isForUpdateLockingEnabled) SingleStoreDialect(org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo info) -
Method Summary
Modifier and TypeMethodDescriptionorg.hibernate.engine.jdbc.env.spi.IdentifierHelperbuildIdentifierHelper(org.hibernate.engine.jdbc.env.spi.IdentifierHelperBuilder builder, DatabaseMetaData metadata) static org.hibernate.dialect.ReplacerdatetimeFormat(String format) org.hibernate.tool.schema.spi.Exporter<org.hibernate.mapping.ForeignKey> SingleStore does not support foreign keys and referential integrityorg.hibernate.dialect.temptable.TemporaryTableStrategyintThe biggest size value that can be supplied as argumentorg.hibernate.dialect.temptable.TemporaryTableKindorg.hibernate.query.sqm.mutation.spi.AfterUseActionorg.hibernate.query.sqm.mutation.spi.BeforeUseActiongetWriteLockString(String aliases, int timeout) booleanbooleanSingleStore doesn't support modifying column type on columnstore tables.booleanFeature 'Check constraints' is not supported by SingleStore.booleanFeature 'Check constraints' is not supported by SingleStore.Methods declared in class org.hibernate.dialect.Dialect
addPartitionKeyToPrimaryKey, addSqlHintOrComment, addUseIndexQueryHint, appendArrayLiteral, appendBinaryLiteral, appendBooleanValueString, appendCheckConstraintOptions, appendDatetimeFormat, appendDateTimeLiteral, appendDateTimeLiteral, appendDateTimeLiteral, appendIntervalLiteral, appendIntervalLiteral, appendLiteral, appendLockHint, appendUUIDLiteral, applyLocksToSql, augmentPhysicalTableTypes, augmentRecognizedTableTypes, buildLockingClauseStrategy, buildOptimisticForceIncrementStrategy, buildOptimisticStrategy, buildPessimisticForceIncrementStrategy, buildPessimisticReadStrategy, buildPessimisticWriteStrategy, buildReadStrategy, buildSQLExceptionConversionDelegate, buildStringToBooleanCast, buildStringToBooleanCastDecode, buildStringToBooleanDecode, canBatchTruncate, canCreateCatalog, canCreateSchema, canDisableConstraints, castPattern, castType, checkVersion, closeQuote, columnType, contribute, contributeFunctions, contributeTypes, createOptionalTableUpdateOperation, currentDate, currentLocalTime, currentLocalTimestamp, currentTime, currentTimestamp, currentTimestampWithTimeZone, defaultScrollMode, determineDatabaseVersion, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, doesRoundTemporalOnOverflow, dropConstraints, equivalentTypes, escapeComment, extractPattern, 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, getCurrentTimestampSelectString, getDefaultDecimalPrecision, getDefaultIntervalSecondScale, getDefaultLobLength, getDefaultNonContextualLobCreation, getDefaultOrdinalityColumnName, getDefaultProperties, getDefaultStatementBatchSize, getDefaultTimestampPrecision, getDefaultUseGetGeneratedKeys, getDisableConstraintsStatement, getDisableConstraintStatement, getDmlTargetColumnQualifierSupport, getDoublePrecision, getDropCatalogCommand, getDropEnumTypeCommand, getDropEnumTypeCommand, getDropForeignKeyString, getDropSchemaCommand, getDropTableString, getDropUniqueKeyString, getDual, getEnableConstraintsStatement, getEnableConstraintStatement, getEnumTypeDeclaration, getEnumTypeDeclaration, getFallbackSchemaManagementTool, getFallbackSqmInsertStrategy, getFallbackSqmMutationStrategy, getFloatPrecision, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFractionalSecondPrecisionInNanos, getFromDualForSelectOnly, getFunctionalDependencyAnalysisSupport, getGlobalTemporaryTableStrategy, getGroupBySelectItemReferenceStrategy, getHqlTranslator, getIdentityColumnSupport, getIndexExporter, getInExpressionCountLimit, getInformationExtractor, getKeywords, getLimitHandler, getLobMergeStrategy, getLockingClauseStrategy, getLockingStrategy, getLockingStrategy, getLockingSupport, getLockRowIdentifier, getLowercaseFunction, getMaxAliasLength, getMaxIdentifierLength, getMaxNVarcharCapacity, getMaxNVarcharLength, getMaxVarbinaryCapacity, getMaxVarcharCapacity, getMaxVarcharLength, getMinimumSupportedVersion, getMultiKeyLoadSizingStrategy, getNameQualifierSupport, getNationalizationSupport, getNativeIdentifierGeneratorStrategy, getNativeParameterMarkerStrategy, getNativeValueGenerationStrategy, getNoColumnsInsertString, getNullColumnString, getNullColumnString, getNullOrdering, getParameterCountLimit, getPersistentTemporaryTableStrategy, getPessimisticLockStyle, getPreferredSqlTypeCodeForArray, getPreferredSqlTypeCodeForBoolean, getQueryHintString, getQueryHintString, getQuerySequencesString, getReadLockString, getReadLockString, getReadLockString, getReadLockString, getReadRowLockStrategy, getResultSet, getResultSet, getResultSet, getRowIdColumnString, getSchemaNameResolver, getSelectClauseNullString, getSelectClauseNullString, getSelectGUIDString, getSequenceExporter, getSequenceInformationExtractor, getSequenceSupport, getSizeStrategy, getSqlAstTranslatorFactory, getSqmTranslatorFactory, getTableCleaner, getTableComment, getTableExporter, getTableMigrator, getTableTypeString, getTemporaryTableCreateOptions, getTemporaryTableDdlTransactionHandling, getTemporaryTableExporter, getTemporaryTableTruncateCommand, getTimeoutInSeconds, getTimeZoneSupport, getTruncateTableStatement, getTruncateTableStatements, getUniqueDelegate, getUniqueKeyExporter, getUserDefinedTypeComment, getUserDefinedTypeExporter, getVersion, getViolatedConstraintNameExtractor, getWriteLockString, getWriteLockString, getWriteLockString, getWriteRowLockStrategy, hasAlterTable, hasDataTypeBeforeGeneratedAs, hasSelfReferentialForeignKeyBug, initDefaultProperties, initializeFunctionRegistry, isCurrentTimestampSelectStringCallable, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLob, openQuote, ordinal, prependComment, qualifyIndexName, quote, quoteCollation, registerColumnTypes, registerDefaultKeywords, registerKeyword, registerKeywords, registerResultSetOutParameter, registerResultSetOutParameter, requiresCastForConcatenatingNonStrings, requiresColumnListInCreateView, requiresFloatCastingOfIntegerDivision, requiresParensForTupleCounts, requiresParensForTupleDistinctCounts, resolveSqlTypeCode, resolveSqlTypeCode, resolveSqlTypeDescriptor, resolveSqlTypeLength, rowId, rowIdSqlType, stripsTrailingSpacesFromChar, supportsArrayConstructor, supportsBatchUpdates, supportsBindAsCallableArgument, supportsBindingNullForSetObject, supportsBindingNullSqlTypeForSetNull, supportsBitType, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsCommentOn, supportsConflictClauseForInsertCTE, supportsCrossJoin, supportsCurrentTimestampSelection, supportsDistinctFromPredicate, supportsDuplicateSelectItemsInQueryGroup, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsFetchClause, supportsFilterClause, supportsForUpdate, supportsFractionalTimestampArithmetic, supportsFromClauseInUpdate, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsAfterTypeName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsIfExistsBeforeTypeName, supportsInsertReturning, supportsInsertReturningGeneratedKeys, supportsInsertReturningRowId, supportsIntersect, supportsIsTrue, supportsJdbcConnectionLobCreation, supportsJoinInMutationStatementSubquery, supportsJoinsInDelete, supportsLateral, supportsLobValueChangePropagation, supportsLockTimeouts, supportsMaterializedLobAccess, supportsNamedColumnCheck, supportsNamedParameters, supportsNationalizedMethods, supportsNestedSubqueryCorrelation, supportsNestedWithClause, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNoWait, supportsNullPrecedence, supportsOffsetInSubquery, supportsOrderByInSubquery, supportsOrdinalSelectItemReference, supportsOuterJoinForUpdate, supportsPartitionBy, supportsPredicateAsExpression, supportsRecursiveCTE, supportsRecursiveCycleClause, supportsRecursiveCycleUsingClause, supportsRecursiveSearchClause, supportsRefCursors, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowConstructor, supportsRowValueConstructorDistinctFromSyntax, supportsRowValueConstructorGtLtSyntax, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsRowValueConstructorSyntaxInInSubQuery, supportsRowValueConstructorSyntaxInQuantifiedPredicates, supportsSimpleQueryGrouping, supportsSkipLocked, supportsStandardArrays, supportsStandardCurrentTimestampFunction, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableOptions, supportsTemporalLiteralOffset, supportsTemporaryTablePrimaryKey, supportsTemporaryTables, supportsTruncateWithCast, supportsTupleCounts, supportsTupleDistinctCounts, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnionInSubquery, supportsUpdateReturning, supportsUserDefinedTypes, supportsValuesList, supportsValuesListForInsert, supportsWait, supportsWindowFunctions, supportsWithClause, supportsWithClauseInSubquery, timestampaddPattern, timestampdiffPattern, toBooleanValueString, toQuotedIdentifier, toString, transformSelectString, translateDurationField, translateExtractField, trimPattern, unquoteGetGeneratedKeys, useArrayForMultiValuedParameters, useConnectionToCreateLob, useCrossReferenceForeignKeys, useFollowOnLocking, useInputStreamToInsertBlob, useMaterializedLobWhenCapacityExceeded
-
Field Details
-
SINGLE_STORE_TABLE_TYPE
Specifies SingleStore explicit table type.- See Also:
- Default Value:
null
-
SINGLE_STORE_FOR_UPDATE_LOCK_ENABLED
Specifies SingleStore FOR UPDATE clause lock enable.- See Also:
- Default Value:
false
-
-
Constructor Details
-
SingleStoreDialect
public SingleStoreDialect() -
SingleStoreDialect
public SingleStoreDialect(org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo info) -
SingleStoreDialect
public SingleStoreDialect(org.hibernate.dialect.DatabaseVersion version, SingleStoreDialect.SingleStoreTableType explicitTableType, boolean isForUpdateLockingEnabled)
-
-
Method Details
-
getMaxVarbinaryLength
public int getMaxVarbinaryLength()The biggest size value that can be supplied as argument- Overrides:
getMaxVarbinaryLengthin classorg.hibernate.dialect.Dialect
-
supportsColumnCheck
public boolean supportsColumnCheck()Feature 'Check constraints' is not supported by SingleStore.- Overrides:
supportsColumnCheckin classorg.hibernate.dialect.Dialect
-
supportsTableCheck
public boolean supportsTableCheck()Feature 'Check constraints' is not supported by SingleStore.- Overrides:
supportsTableCheckin classorg.hibernate.dialect.Dialect
-
datetimeFormat
-
supportsAlterColumnType
public boolean supportsAlterColumnType()SingleStore doesn't support modifying column type on columnstore tables. It only supports modifying column type on rowstore table.- Overrides:
supportsAlterColumnTypein classorg.hibernate.dialect.Dialect
-
getSupportedTemporaryTableKind
public org.hibernate.dialect.temptable.TemporaryTableKind getSupportedTemporaryTableKind()- Overrides:
getSupportedTemporaryTableKindin classorg.hibernate.dialect.Dialect
-
getLocalTemporaryTableStrategy
public org.hibernate.dialect.temptable.TemporaryTableStrategy getLocalTemporaryTableStrategy()- Overrides:
getLocalTemporaryTableStrategyin classorg.hibernate.dialect.Dialect
-
getTemporaryTableCreateCommand
- Overrides:
getTemporaryTableCreateCommandin classorg.hibernate.dialect.Dialect
-
getTemporaryTableDropCommand
- Overrides:
getTemporaryTableDropCommandin classorg.hibernate.dialect.Dialect
-
getTemporaryTableAfterUseAction
public org.hibernate.query.sqm.mutation.spi.AfterUseAction getTemporaryTableAfterUseAction()- Overrides:
getTemporaryTableAfterUseActionin classorg.hibernate.dialect.Dialect
-
getTemporaryTableBeforeUseAction
public org.hibernate.query.sqm.mutation.spi.BeforeUseAction getTemporaryTableBeforeUseAction()- Overrides:
getTemporaryTableBeforeUseActionin classorg.hibernate.dialect.Dialect
-
buildIdentifierHelper
public org.hibernate.engine.jdbc.env.spi.IdentifierHelper buildIdentifierHelper(org.hibernate.engine.jdbc.env.spi.IdentifierHelperBuilder builder, DatabaseMetaData metadata) throws SQLException - Overrides:
buildIdentifierHelperin classorg.hibernate.dialect.Dialect- Throws:
SQLException
-
getWriteLockString
-
getForeignKeyExporter
public org.hibernate.tool.schema.spi.Exporter<org.hibernate.mapping.ForeignKey> getForeignKeyExporter()SingleStore does not support foreign keys and referential integrity- Overrides:
getForeignKeyExporterin classorg.hibernate.dialect.Dialect
-
getExplicitTableType
-
isForUpdateLockingEnabled
public boolean isForUpdateLockingEnabled()
-