public class SQLServer2005Dialect extends SQLServerDialect
A dialect for Microsoft SQL 2005. (HHH-3936 fix)
CLOSED_QUOTE, DEFAULT_BATCH_SIZE, LEGACY_LOB_MERGE_STRATEGY, NEW_LOCATOR_LOB_MERGE_STRATEGY, NO_BATCH, QUOTE, STANDARD_DEFAULT_BATCH_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGY| Constructor and Description |
|---|
SQLServer2005Dialect()
Constructs a SQLServer2005Dialect
|
| Modifier and Type | Method and Description |
|---|---|
String |
appendLockHint(LockOptions lockOptions,
String tableName)
Some dialects support an alternative means to <tt>SELECT FOR UPDATE</tt>,
whereby a "lock hint" is appends to the table name in the from clause.
|
String |
applyLocksToSql(String sql,
LockOptions aliasedLockOptions,
Map<String,String[]> keyColumnNames)
Modifies the given SQL by applying the appropriate updates for the specified
lock modes and key columns.
|
SQLExceptionConversionDelegate |
buildSQLExceptionConversionDelegate()
Build an instance of a
SQLExceptionConversionDelegate for
interpreting dialect-specific error or SQLState codes. |
String |
getAddColumnString()
The syntax used to add a column to a table (optional).
|
protected LimitHandler |
getDefaultLimitHandler() |
MultiTableBulkIdStrategy |
getDefaultMultiTableBulkIdStrategy() |
String |
getForUpdateString()
Get the string to append to SELECT statements to acquire locks
for this dialect.
|
String |
getNullColumnString()
The keyword used to specify a nullable column.
|
ResultSet |
getResultSet(CallableStatement ps)
Given a callable statement previously processed by
Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int),
extract the ResultSet from the OUT parameter. |
String |
getSelectGUIDString()
Get the command used to select a GUID from the underlying database.
|
boolean |
isCurrentTimestampSelectStringCallable()
Should the value returned by
Dialect.getCurrentTimestampSelectString()
be treated as callable. |
boolean |
qualifyIndexName()
Do we need to qualify index names with the schema name?
|
int |
registerResultSetOutParameter(CallableStatement statement,
int col)
Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of
returning
ResultSet by position. |
boolean |
supportsCurrentTimestampSelection()
Does this dialect support a way to retrieve the database’s current
timestamp value?
|
boolean |
supportsEmptyInList()
Does this dialect support empty IN lists?
<p/>
For example, is [where XYZ in ()] a supported construct?
|
boolean |
supportsExistsInSelect()
Does the dialect support an exists statement in the select clause?
|
boolean |
supportsNonQueryWithCTE()
Does this dialect/database support non-query statements (e.g.
|
boolean |
supportsPartitionBy()
Does the underlying database support partition by
|
boolean |
supportsSkipLocked()
Does this dialect/database support SKIP_LOCKED timeout.
|
boolean |
supportsTupleDistinctCounts()
Does this dialect support
count(distinct a,b)? |
boolean |
supportsTuplesInSubqueries()
Does this dialect support tuples in subqueries? Ex:
delete from Table1 where (col1, col2) in (select col1, col2 from Table2)
|
boolean |
supportsUnionAll()
Does this dialect support UNION ALL, which is generally a faster
variant of UNION?
|
areStringComparisonsCaseInsensitive, closeQuote, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, getCurrentSchemaCommand, getCurrentTimestampSelectString, getIdentityColumnSupport, getInExpressionCountLimit, getLimitHandler, getLimitString, getNoColumnsInsertString, getSqlTypeDescriptorOverride, openQuote, supportsCircularCascadeDeleteConstraints, supportsLimit, supportsLimitOffset, supportsLobValueChangePropogation, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsVariableLimit, useMaxForLimitaddSqlHintOrComment, appendLockHint, augmentRecognizedTableTypes, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildIdentifierHelper, buildSQLExceptionConverter, canCreateCatalog, canCreateSchema, cast, cast, cast, contributeTypes, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, defaultScrollMode, dropConstraints, escapeLiteral, forceLimitUsage, forceLobAsLastValue, forUpdateOfColumns, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCrossJoinSeparator, getCurrentTimestampSQLFunctionName, getDefaultBatchLoadSizingStrategy, getDefaultProperties, getDialect, getDialect, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropSequenceString, getDropSequenceStrings, getDropTableString, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIndexExporter, getKeywords, getLimitString, getLobMergeStrategy, getLockingStrategy, getLowercaseFunction, getMaxAliasLength, getNameQualifierSupport, getNativeIdentifierGeneratorClass, getNativeIdentifierGeneratorStrategy, getNotExpression, getQueryHintString, getQueryHintString, getQuerySequencesString, getReadLockString, getReadLockString, getResultSet, getResultSet, getSchemaNameResolver, getSelectClauseNullString, getSelectSequenceNextValString, getSequenceExporter, getSequenceInformationExtractor, getSequenceNextValString, getTableComment, getTableExporter, getTableTypeString, getTypeName, getTypeName, getUniqueDelegate, getUniqueKeyExporter, getViolatedConstraintNameExtracter, getWriteLockString, getWriteLockString, hasAlterTable, hasSelfReferentialForeignKeyBug, inlineLiteral, isJdbcLogWarningsEnabledByDefault, isLegacyLimitHandlerBehaviorEnabled, isLockTimeoutParameterized, isTypeNameRegistered, prependComment, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, remapSqlTypeDescriptor, renderOrderByElement, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, requiresParensForTupleDistinctCounts, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsColumnCheck, supportsCommentOn, supportsExpectedLobUsagePattern, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsLockTimeouts, supportsNamedParameters, supportsNationalizedTypes, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPooledSequences, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsSequences, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsUnboundedLobLocatorMaterialization, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, toBooleanValueString, toString, transformSelectString, useFollowOnLocking, useFollowOnLocking, useInputStreamToInsertBlobpublic SQLServer2005Dialect()
Constructs a SQLServer2005Dialect
protected LimitHandler getDefaultLimitHandler()
getDefaultLimitHandler in class SQLServerDialectpublic String appendLockHint(LockOptions lockOptions, String tableName)
DialectSome dialects support an alternative means to <tt>SELECT FOR UPDATE</tt>, whereby a "lock hint" is appends to the table name in the from clause. <p/> contributed by <a href="http://sourceforge.net/users/heschulz">Helge Schulz</a>
appendLockHint in class SQLServerDialectlockOptions - The lock options to applytableName - The name of the table to which to apply the lock hint.public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate()
DialectBuild an instance of a SQLExceptionConversionDelegate for
interpreting dialect-specific error or SQLState codes.
<p/>
When Dialect.buildSQLExceptionConverter() returns null, the default
SQLExceptionConverter is used to interpret SQLState and
error codes. If this method is overridden to return a non-null value,
the default SQLExceptionConverter will use the returned
SQLExceptionConversionDelegate in addition to the following
standard delegates:
<ol>
<li>a "static" delegate based on the JDBC 4 defined SQLException hierarchy;</li>
<li>a delegate that interprets SQLState codes for either X/Open or SQL-2003 codes,
depending on java.sql.DatabaseMetaData#getSQLStateType</li>
</ol>
<p/>
It is strongly recommended that specific Dialect implementations override this
method, since interpretation of a SQL error is much more accurate when based on
the a vendor-specific ErrorCode rather than the SQLState.
<p/>
Specific Dialects may override to return whatever is most appropriate for that vendor.
buildSQLExceptionConversionDelegate in class Dialectpublic boolean supportsNonQueryWithCTE()
DialectDoes this dialect/database support non-query statements (e.g. INSERT, UPDATE, DELETE) with CTE (Common Table Expressions)?
supportsNonQueryWithCTE in class Dialecttrue if non-query statements are supported with CTEpublic boolean supportsSkipLocked()
DialectDoes this dialect/database support SKIP_LOCKED timeout.
supportsSkipLocked in class Dialecttrue if SKIP_LOCKED is supportedpublic String getAddColumnString()
DialectThe syntax used to add a column to a table (optional).
getAddColumnString in class Dialectpublic String getNullColumnString()
DialectThe keyword used to specify a nullable column.
getNullColumnString in class Dialectpublic boolean qualifyIndexName()
DialectDo we need to qualify index names with the schema name?
qualifyIndexName in class Dialectpublic String getForUpdateString()
DialectGet the string to append to SELECT statements to acquire locks for this dialect.
getForUpdateString in class Dialectpublic String applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map<String,String[]> keyColumnNames)
DialectModifies the given SQL by applying the appropriate updates for the specified lock modes and key columns. <p/> The behavior here is that of an ANSI SQL <tt>SELECT FOR UPDATE</tt>. This method is really intended to allow dialects which do not support <tt>SELECT FOR UPDATE</tt> to achieve this in their own fashion.
applyLocksToSql in class Dialectsql - the SQL string to modifyaliasedLockOptions - lock options indexed by aliased table names.keyColumnNames - a map of key columns indexed by aliased table names.public int registerResultSetOutParameter(CallableStatement statement, int col) throws SQLException
DialectRegisters a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of
returning ResultSet by position. Pre-Java 8, registering such ResultSet-returning
parameters varied greatly across database and drivers; hence its inclusion as part of the Dialect contract.
registerResultSetOutParameter in class Dialectstatement - The callable statement.col - The bind position at which to register the output param.SQLException - Indicates problems registering the param.public ResultSet getResultSet(CallableStatement ps) throws SQLException
DialectGiven a callable statement previously processed by Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int),
extract the ResultSet from the OUT parameter.
getResultSet in class Dialectps - The callable statement.SQLException - Indicates problems extracting the result set.public boolean supportsCurrentTimestampSelection()
DialectDoes this dialect support a way to retrieve the database’s current timestamp value?
supportsCurrentTimestampSelection in class Dialectpublic boolean isCurrentTimestampSelectStringCallable()
DialectShould the value returned by Dialect.getCurrentTimestampSelectString()
be treated as callable. Typically this indicates that JDBC escape
syntax is being used…
isCurrentTimestampSelectStringCallable in class DialectDialect.getCurrentTimestampSelectString() return
is callable; false otherwise.public MultiTableBulkIdStrategy getDefaultMultiTableBulkIdStrategy()
getDefaultMultiTableBulkIdStrategy in class Dialectpublic String getSelectGUIDString()
DialectGet the command used to select a GUID from the underlying database. <p/> Optional operation.
getSelectGUIDString in class Dialectpublic boolean supportsEmptyInList()
DialectDoes this dialect support empty IN lists? <p/> For example, is [where XYZ in ()] a supported construct?
supportsEmptyInList in class Dialectpublic boolean supportsUnionAll()
DialectDoes this dialect support UNION ALL, which is generally a faster variant of UNION?
supportsUnionAll in class Dialectpublic boolean supportsExistsInSelect()
DialectDoes the dialect support an exists statement in the select clause?
supportsExistsInSelect in class Dialectpublic boolean supportsTupleDistinctCounts()
DialectDoes this dialect support count(distinct a,b)?
supportsTupleDistinctCounts in class Dialectpublic boolean supportsTuplesInSubqueries()
DialectDoes this dialect support tuples in subqueries? Ex: delete from Table1 where (col1, col2) in (select col1, col2 from Table2)
supportsTuplesInSubqueries in class Dialectpublic boolean supportsPartitionBy()
DialectDoes the underlying database support partition by
supportsPartitionBy in class DialectCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.