org.hibernate.dialect

Class MimerSQLDialect


public class MimerSQLDialect
extends Dialect

An Hibernate 3 SQL dialect for Mimer SQL. This dialect requires Mimer SQL 9.2.1 or later because of the mappings to NCLOB, BINARY, and BINARY VARYING.
Author:
Fredrik ???lund

Field Summary

Fields inherited from class org.hibernate.dialect.Dialect

CLOSED_QUOTE, DEFAULT_BATCH_SIZE, NO_BATCH, QUOTE

Constructor Summary

MimerSQLDialect()
Even thoug Mimer SQL supports character and binary columns up to 15 000 in lenght, this is also the maximum width of the table (exluding LOBs).

Method Summary

boolean
dropConstraints()
We do not have to drop constraints before we drop the table
boolean
forUpdateOfColumns()
Does the FOR UPDATE OF syntax specify particular columns?
String
getAddColumnString()
The syntax used to add a column to a table
String
getCascadeConstraintsString()
The syntax for using cascade on constraints
String
getCreateSequenceString(String sequenceName)
The syntax used to create a sequence.
String
getDropSequenceString(String sequenceName)
The syntax used to drop sequences
String
getQuerySequencesString()
The syntax for fetching all sequnces avialable in the current schema.
String
getSequenceNextValString(String sequenceName)
The syntax used to get the next value of a sequence in Mimer SQL
boolean
supportsForUpdate()
Support the FOR UPDATE syntax? For now, returns false since the current version of the Mimer SQL JDBC Driver does not support updatable resultsets.
boolean
supportsIdentityColumns()
TODO: Check if Mimer SQL cannot handle the way DB2 does
boolean
supportsLimit()
Mimer SQL does not support limit
boolean
supportsOuterJoinForUpdate()
For now, simply return false since we don't updatable result sets.
boolean
supportsSequences()
Mimer SQL supports sequences

Methods inherited from class org.hibernate.dialect.Dialect

appendIdentitySelectToInsert, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildSQLExceptionConverter, closeQuote, createCaseFragment, createOuterJoinFragment, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, dropConstraints, dropTemporaryTableAfterUse, forUpdateOfColumns, generateTemporaryTableName, getAddColumnString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getCascadeConstraintsString, getCastTypeName, getColumnComment, getCreateMultisetTableString, getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCreateTemporaryTablePostfix, getCreateTemporaryTableString, getCurrentTimestampSQLFunctionName, getCurrentTimestampSelectString, getDefaultProperties, getDialect, getDialect, getDropForeignKeyString, getDropSequenceString, getDropSequenceStrings, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnString, getIdentityColumnString, getIdentityInsertString, getIdentitySelectString, getIdentitySelectString, getKeywords, getLimitString, getLimitString, getLockingStrategy, getLowercaseFunction, getMaxAliasLength, getNativeIdentifierGeneratorClass, getNoColumnsInsertString, getNullColumnString, getQuerySequencesString, getResultSet, getSelectClauseNullString, getSelectGUIDString, getSelectSequenceNextValString, getSequenceNextValString, getTableComment, getTableTypeString, getTypeName, getTypeName, getViolatedConstraintNameExtracter, hasAlterTable, hasDataTypeInIdentityColumn, hasSelfReferentialForeignKeyBug, isCurrentTimestampSelectStringCallable, openQuote, performTemporaryTableDDLInIsolation, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCommentOn, supportsCurrentTimestampSelection, supportsEmptyInList, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsIdentityColumns, supportsIfExistsAfterTableName, supportsIfExistsBeforeTableName, supportsInsertSelectIdentity, supportsLimit, supportsLimitOffset, supportsLobValueChangePropogation, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsSequences, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTemporaryTables, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, useInputStreamToInsertBlob, useMaxForLimit

Constructor Details

MimerSQLDialect

public MimerSQLDialect()
Even thoug Mimer SQL supports character and binary columns up to 15 000 in lenght, this is also the maximum width of the table (exluding LOBs). To avoid breaking the limit all the time we limit the length of the character columns to CHAR_MAX_LENTH, NATIONAL_CHAR_LENGTH for national characters, and BINARY_MAX_LENGTH for binary types.

Method Details

dropConstraints

public boolean dropConstraints()
We do not have to drop constraints before we drop the table
Overrides:
dropConstraints in interface Dialect

forUpdateOfColumns

public boolean forUpdateOfColumns()
Does the FOR UPDATE OF syntax specify particular columns?
Overrides:
forUpdateOfColumns in interface Dialect

getAddColumnString

public String getAddColumnString()
The syntax used to add a column to a table
Overrides:
getAddColumnString in interface Dialect

getCascadeConstraintsString

public String getCascadeConstraintsString()
The syntax for using cascade on constraints
Overrides:
getCascadeConstraintsString in interface Dialect

getCreateSequenceString

public String getCreateSequenceString(String sequenceName)
The syntax used to create a sequence. Since we presume the sequences will be used as keys, we make them unique.
Overrides:
getCreateSequenceString in interface Dialect

getDropSequenceString

public String getDropSequenceString(String sequenceName)
The syntax used to drop sequences
Overrides:
getDropSequenceString in interface Dialect

getQuerySequencesString

public String getQuerySequencesString()
The syntax for fetching all sequnces avialable in the current schema.
Overrides:
getQuerySequencesString in interface Dialect

getSequenceNextValString

public String getSequenceNextValString(String sequenceName)
The syntax used to get the next value of a sequence in Mimer SQL
Overrides:
getSequenceNextValString in interface Dialect

supportsForUpdate

public boolean supportsForUpdate()
Support the FOR UPDATE syntax? For now, returns false since the current version of the Mimer SQL JDBC Driver does not support updatable resultsets. Otherwise, Mimer SQL actually supports the for update syntax.
Returns:
boolean

supportsIdentityColumns

public boolean supportsIdentityColumns()
TODO: Check if Mimer SQL cannot handle the way DB2 does
Overrides:
supportsIdentityColumns in interface Dialect

supportsLimit

public boolean supportsLimit()
Mimer SQL does not support limit
Overrides:
supportsLimit in interface Dialect

supportsOuterJoinForUpdate

public boolean supportsOuterJoinForUpdate()
For now, simply return false since we don't updatable result sets.
Overrides:
supportsOuterJoinForUpdate in interface Dialect

supportsSequences

public boolean supportsSequences()
Mimer SQL supports sequences
Overrides:
supportsSequences in interface Dialect
Returns:
boolean