Class SybaseAnywhereDialect

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

public class SybaseAnywhereDialect extends org.hibernate.dialect.SybaseDialect
SQL Dialect for Sybase/SQL Anywhere (Tested on ASA 8.x)
  • 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.SybaseDialect

    jtdsDriver

    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
     
    SybaseAnywhereDialect(org.hibernate.dialect.DatabaseVersion version)
     
    SybaseAnywhereDialect(org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo info)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    appendLockHint(org.hibernate.LockOptions mode, String tableName)
     
    applyLocksToSql(String sql, org.hibernate.LockOptions aliasedLockOptions, Map<String,String[]> keyColumnNames)
     
    protected String
    columnType(int sqlTypeCode)
     
     
     
     
    boolean
    ASA does not require to drop constraint before dropping tables, so disable it.
     
     
     
     
    org.hibernate.dialect.identity.IdentityColumnSupport
     
    org.hibernate.dialect.pagination.LimitHandler
     
    org.hibernate.dialect.lock.spi.LockingSupport
     
    int
     
    Sybase Anywhere syntax would require a "DEFAULT" for each column specified, but I suppose Hibernate use this syntax only with tables with just 1 column
    org.hibernate.sql.ast.SqlAstTranslatorFactory
     
    org.hibernate.dialect.TimeZoneSupport
     
    void
    initializeFunctionRegistry(org.hibernate.boot.model.FunctionContributions functionContributions)
     
    boolean
     
    boolean
     
    boolean
     

    Methods inherited from class org.hibernate.dialect.SybaseDialect

    addPartitionKeyToPrimaryKey, appendDatetimeFormat, appendDateTimeLiteral, appendDateTimeLiteral, appendDateTimeLiteral, buildIdentifierHelper, canCreateSchema, castPattern, contributeTypes, extractPattern, getAlterColumnTypeString, getCallableStatementSupport, getCurrentSchemaCommand, getDmlTargetColumnQualifierSupport, getDriverKind, getInExpressionCountLimit, getMaxIdentifierLength, getMinimumSupportedVersion, getNameQualifierSupport, getNationalizationSupport, getNullColumnString, getParameterCountLimit, getSchemaNameResolver, getSqmTranslatorFactory, getUniqueDelegate, resolveSqlTypeDescriptor, resolveSqlTypeLength, stripsTrailingSpacesFromChar, supportsAlterColumnType, supportsFractionalTimestampArithmetic, supportsFromClauseInUpdate, supportsNamedParameters, supportsNullPrecedence, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsRowValueConstructorSyntaxInQuantifiedPredicates, supportsStandardCurrentTimestampFunction, supportsWithClause, timestampaddPattern, timestampdiffPattern, translateExtractField

    Methods inherited from class org.hibernate.dialect.AbstractTransactSQLDialect

    appendBinaryLiteral, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, getAddColumnString, getCurrentTimestampSelectString, getDefaultStatementBatchSize, getFallbackSqmInsertStrategy, getFallbackSqmMutationStrategy, getLocalTemporaryTableStrategy, getLockingClauseStrategy, getNullOrdering, getPreferredSqlTypeCodeForBoolean, getResultSet, getSelectGUIDString, getSupportedTemporaryTableKind, getTemporaryTableAfterUseAction, getTemporaryTableBeforeUseAction, getTemporaryTableCreateCommand, isCurrentTimestampSelectStringCallable, qualifyIndexName, registerResultSetOutParameter, replaceLtrimRtrim, requiresCastForConcatenatingNonStrings, supportsCurrentTimestampSelection, supportsExistsInSelect, supportsPartitionBy, supportsTupleDistinctCounts, trimPattern

    Methods inherited from class org.hibernate.dialect.Dialect

    addSqlHintOrComment, addUseIndexQueryHint, appendArrayLiteral, appendBooleanValueString, appendCheckConstraintOptions, appendIntervalLiteral, appendIntervalLiteral, appendLiteral, appendUUIDLiteral, augmentPhysicalTableTypes, augmentRecognizedTableTypes, buildLockingClauseStrategy, buildOptimisticForceIncrementStrategy, buildOptimisticStrategy, buildPessimisticForceIncrementStrategy, buildPessimisticReadStrategy, buildPessimisticWriteStrategy, buildReadStrategy, buildSQLExceptionConversionDelegate, buildStringToBooleanCast, buildStringToBooleanCastDecode, buildStringToBooleanDecode, canBatchTruncate, canCreateCatalog, canDisableConstraints, castType, checkVersion, closeQuote, contribute, contributeFunctions, createOptionalTableUpdateOperation, currentLocalTime, currentLocalTimestamp, currentTimestampWithTimeZone, defaultScrollMode, determineDatabaseVersion, doesRoundTemporalOnOverflow, equivalentTypes, escapeComment, forceLobAsLastValue, generatedAs, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAggregateSupport, getAlterTableString, getArrayTypeName, getAuxiliaryDatabaseObjectExporter, getBatchLoadSizingStrategy, getBeforeDropStatement, getCascadeConstraintsString, getCaseInsensitiveLike, getCatalogSeparator, getCheckCondition, getCheckCondition, getCheckCondition, getCheckCondition, getCheckCondition, getCheckCondition, getCheckConstraintString, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateEnumTypeCommand, getCreateEnumTypeCommand, getCreateIndexString, getCreateIndexTail, getCreateMultisetTableString, getCreateSchemaCommand, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCreateUserDefinedTypeExtensionsString, getCreateUserDefinedTypeKindString, getCrossReferenceParentTableFilter, getDefaultDecimalPrecision, getDefaultIntervalSecondScale, getDefaultLobLength, getDefaultNonContextualLobCreation, getDefaultOrdinalityColumnName, getDefaultProperties, getDefaultTimestampPrecision, getDefaultUseGetGeneratedKeys, getDisableConstraintsStatement, getDisableConstraintStatement, getDoublePrecision, getDropCatalogCommand, getDropEnumTypeCommand, getDropEnumTypeCommand, getDropForeignKeyString, getDropSchemaCommand, getDropTableString, getDropUniqueKeyString, getEnableConstraintsStatement, getEnableConstraintStatement, getEnumTypeDeclaration, getEnumTypeDeclaration, getFallbackSchemaManagementTool, getFloatPrecision, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFractionalSecondPrecisionInNanos, getFunctionalDependencyAnalysisSupport, getGlobalTemporaryTableStrategy, getGroupBySelectItemReferenceStrategy, getHqlTranslator, getIndexExporter, getInformationExtractor, getKeywords, getLobMergeStrategy, getLockingStrategy, getLockingStrategy, getLockRowIdentifier, getLowercaseFunction, getMaxAliasLength, getMaxNVarcharCapacity, getMaxNVarcharLength, getMaxVarbinaryCapacity, getMaxVarbinaryLength, getMaxVarcharCapacity, getMultiKeyLoadSizingStrategy, getNativeIdentifierGeneratorStrategy, getNativeParameterMarkerStrategy, getNativeValueGenerationStrategy, getNullColumnString, getPersistentTemporaryTableStrategy, getPessimisticLockStyle, getPreferredSqlTypeCodeForArray, getQueryHintString, getQueryHintString, getQuerySequencesString, getReadLockString, getReadLockString, getReadLockString, getReadLockString, getReadRowLockStrategy, getResultSet, getResultSet, getRowIdColumnString, getSelectClauseNullString, getSelectClauseNullString, getSequenceExporter, getSequenceInformationExtractor, getSequenceSupport, getSizeStrategy, getTableCleaner, getTableComment, getTableExporter, getTableMigrator, getTableTypeString, getTemporaryTableCreateOptions, getTemporaryTableDdlTransactionHandling, getTemporaryTableDropCommand, getTemporaryTableExporter, getTemporaryTableTruncateCommand, getTimeoutInSeconds, getTruncateTableStatement, getTruncateTableStatements, getUniqueKeyExporter, getUserDefinedTypeComment, getUserDefinedTypeExporter, getVersion, getViolatedConstraintNameExtractor, getWriteLockString, getWriteLockString, getWriteLockString, getWriteLockString, getWriteRowLockStrategy, hasAlterTable, hasDataTypeBeforeGeneratedAs, hasSelfReferentialForeignKeyBug, initDefaultProperties, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLob, openQuote, ordinal, prependComment, quote, quoteCollation, registerColumnTypes, registerDefaultKeywords, registerKeyword, registerKeywords, registerResultSetOutParameter, requiresColumnListInCreateView, requiresFloatCastingOfIntegerDivision, requiresParensForTupleCounts, requiresParensForTupleDistinctCounts, resolveSqlTypeCode, resolveSqlTypeCode, rowId, rowIdSqlType, supportsArrayConstructor, supportsBatchUpdates, supportsBindAsCallableArgument, supportsBindingNullForSetObject, supportsBindingNullSqlTypeForSetNull, supportsBitType, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCommentOn, supportsConflictClauseForInsertCTE, supportsCrossJoin, supportsDistinctFromPredicate, supportsDuplicateSelectItemsInQueryGroup, supportsExpectedLobUsagePattern, supportsFetchClause, supportsFilterClause, supportsForUpdate, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsAfterTypeName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsIfExistsBeforeTypeName, supportsInsertReturning, supportsInsertReturningGeneratedKeys, supportsInsertReturningRowId, supportsIntersect, supportsIsTrue, supportsJdbcConnectionLobCreation, supportsJoinInMutationStatementSubquery, supportsJoinsInDelete, supportsLobValueChangePropagation, supportsLockTimeouts, supportsMaterializedLobAccess, supportsNamedColumnCheck, supportsNationalizedMethods, supportsNestedSubqueryCorrelation, supportsNestedWithClause, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNoWait, supportsOffsetInSubquery, supportsOrderByInSubquery, supportsOrdinalSelectItemReference, supportsOuterJoinForUpdate, supportsPredicateAsExpression, supportsRecursiveCTE, supportsRecursiveCycleClause, supportsRecursiveCycleUsingClause, supportsRecursiveSearchClause, supportsRefCursors, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowConstructor, supportsRowValueConstructorDistinctFromSyntax, supportsRowValueConstructorGtLtSyntax, supportsRowValueConstructorSyntaxInInSubQuery, supportsSimpleQueryGrouping, supportsSkipLocked, supportsStandardArrays, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTableOptions, supportsTemporalLiteralOffset, supportsTemporaryTablePrimaryKey, supportsTemporaryTables, supportsTruncateWithCast, supportsTupleCounts, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnionInSubquery, supportsUpdateReturning, supportsUserDefinedTypes, supportsValuesList, supportsValuesListForInsert, supportsWait, supportsWithClauseInSubquery, toBooleanValueString, toQuotedIdentifier, toString, transformSelectString, translateDurationField, unquoteGetGeneratedKeys, useArrayForMultiValuedParameters, useConnectionToCreateLob, useCrossReferenceForeignKeys, useFollowOnLocking, useInputStreamToInsertBlob

    Methods inherited from class Object

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

    • SybaseAnywhereDialect

      public SybaseAnywhereDialect()
    • SybaseAnywhereDialect

      public SybaseAnywhereDialect(org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo info)
    • SybaseAnywhereDialect

      public SybaseAnywhereDialect(org.hibernate.dialect.DatabaseVersion version)
  • Method Details

    • columnType

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

      public boolean useMaterializedLobWhenCapacityExceeded()
      Overrides:
      useMaterializedLobWhenCapacityExceeded in class org.hibernate.dialect.Dialect
    • initializeFunctionRegistry

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

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

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

      public org.hibernate.dialect.TimeZoneSupport getTimeZoneSupport()
      Overrides:
      getTimeZoneSupport in class org.hibernate.dialect.Dialect
    • currentDate

      public String currentDate()
      Overrides:
      currentDate in class org.hibernate.dialect.Dialect
    • currentTime

      public String currentTime()
      Overrides:
      currentTime in class org.hibernate.dialect.Dialect
    • currentTimestamp

      public String currentTimestamp()
      Overrides:
      currentTimestamp in class org.hibernate.dialect.Dialect
    • getNoColumnsInsertString

      public String getNoColumnsInsertString()
      Sybase Anywhere syntax would require a "DEFAULT" for each column specified, but I suppose Hibernate use this syntax only with tables with just 1 column

      Overrides:
      getNoColumnsInsertString in class org.hibernate.dialect.Dialect
    • dropConstraints

      public boolean dropConstraints()
      ASA does not require to drop constraint before dropping tables, so disable it.

      NOTE : Also, the DROP statement syntax used by Hibernate to drop constraints is not compatible with ASA.

      Overrides:
      dropConstraints in class org.hibernate.dialect.Dialect
    • supportsWindowFunctions

      public boolean supportsWindowFunctions()
      Overrides:
      supportsWindowFunctions in class org.hibernate.dialect.Dialect
    • supportsLateral

      public boolean supportsLateral()
      Overrides:
      supportsLateral in class org.hibernate.dialect.Dialect
    • getIdentityColumnSupport

      public org.hibernate.dialect.identity.IdentityColumnSupport getIdentityColumnSupport()
      Overrides:
      getIdentityColumnSupport in class org.hibernate.dialect.SybaseDialect
    • getLockingSupport

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

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

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

      public String appendLockHint(org.hibernate.LockOptions mode, String tableName)
      Overrides:
      appendLockHint in class org.hibernate.dialect.AbstractTransactSQLDialect
    • applyLocksToSql

      public String applyLocksToSql(String sql, org.hibernate.LockOptions aliasedLockOptions, Map<String,String[]> keyColumnNames)
      Overrides:
      applyLocksToSql in class org.hibernate.dialect.AbstractTransactSQLDialect
    • getLimitHandler

      public org.hibernate.dialect.pagination.LimitHandler getLimitHandler()
      Overrides:
      getLimitHandler 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