org.hibernate.dialect
Class SQLServerDialect

java.lang.Object
  extended byorg.hibernate.dialect.Dialect
      extended byorg.hibernate.dialect.SybaseDialect
          extended byorg.hibernate.dialect.SQLServerDialect

public class SQLServerDialect
extends SybaseDialect

A dialect for Microsoft SQL Server 2000

Author:
Gavin King

Nested Class Summary
static class SQLServerDialect.TrimFunction
          A SQLServer-specific version of the ANSI-SQL trim function as SQLServer does not support such a thing.
 
Field Summary
 
Fields inherited from class org.hibernate.dialect.Dialect
CLOSED_QUOTE, QUOTE
 
Constructor Summary
SQLServerDialect()
           
 
Method Summary
 String appendIdentitySelectToInsert(String insertSQL)
          Use insert table(...) values(...) select SCOPE_IDENTITY()
 String appendLockHint(LockMode mode, String tableName)
          Method appendLockHint appends according to the given lock mode a lock hint behind the given table name, if this dialect needs this.
 char closeQuote()
          The closing quote for a quoted identifier
 String getCurrentTimestampSelectString()
           
 String getLimitString(String querySelect, int offset, int limit)
           
 String getNoColumnsInsertString()
          The keyword used to insert a row without specifying any column values.
 String getSelectGUIDString()
           
 char openQuote()
          The opening quote for a quoted identifier
 boolean supportsLimit()
          Does this Dialect have some kind of LIMIT syntax?
 boolean supportsLimitOffset()
          Does this dialect support an offset?
 boolean supportsVariableLimit()
           
 boolean useMaxForLimit()
          Does the LIMIT clause take a "maximum" row number instead of a total number of returned rows?
 
Methods inherited from class org.hibernate.dialect.SybaseDialect
dropTemporaryTableAfterUse, generateTemporaryTableName, getAddColumnString, getForUpdateString, getIdentityColumnString, getIdentitySelectString, getNullColumnString, getResultSet, isCurrentTimestampSelectStringCallable, qualifyIndexName, registerResultSetOutParameter, supportsCurrentTimestampSelection, supportsIdentityColumns, supportsInsertSelectIdentity, supportsTemporaryTables
 
Methods inherited from class org.hibernate.dialect.Dialect
bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildSQLExceptionConverter, createCaseFragment, createOuterJoinFragment, dropConstraints, forUpdateOfColumns, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getCascadeConstraintsString, getCastTypeName, getColumnComment, getCreateSequenceString, getCreateSequenceStrings, getCreateTemporaryTablePostfix, getCreateTemporaryTableString, getCurrentTimestampSQLFunctionName, getDefaultProperties, getDialect, getDialect, getDropForeignKeyString, getDropSequenceString, getDropSequenceStrings, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnString, getIdentityInsertString, getIdentitySelectString, getKeywords, getLimitString, getLowercaseFunction, getMaxAliasLength, getNativeIdentifierGeneratorClass, getQuerySequencesString, getSelectClauseNullString, getSelectSequenceNextValString, getSequenceNextValString, getTableComment, getTableTypeString, getTypeName, getTypeName, getViolatedConstraintNameExtracter, hasAlterTable, hasDataTypeInIdentityColumn, hasSelfReferentialForeignKeyBug, performTemporaryTableDDLInIsolation, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, supportsCascadeDelete, supportsColumnCheck, supportsCommentOn, supportsIfExistsAfterTableName, supportsIfExistsBeforeTableName, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsSequences, supportsTableCheck, supportsUnionAll, supportsUnique, supportsUniqueConstraintInCreateAlterTable, toBooleanValueString, toString, transformSelectString, useInputStreamToInsertBlob
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLServerDialect

public SQLServerDialect()
Method Detail

getNoColumnsInsertString

public String getNoColumnsInsertString()
Description copied from class: Dialect
The keyword used to insert a row without specifying any column values. This is not possible on some databases.

Overrides:
getNoColumnsInsertString in class Dialect

getLimitString

public String getLimitString(String querySelect,
                             int offset,
                             int limit)
Overrides:
getLimitString in class Dialect

appendIdentitySelectToInsert

public String appendIdentitySelectToInsert(String insertSQL)
Use insert table(...) values(...) select SCOPE_IDENTITY()

Overrides:
appendIdentitySelectToInsert in class SybaseDialect

supportsLimit

public boolean supportsLimit()
Description copied from class: Dialect
Does this Dialect have some kind of LIMIT syntax?

Overrides:
supportsLimit in class Dialect

useMaxForLimit

public boolean useMaxForLimit()
Description copied from class: Dialect
Does the LIMIT clause take a "maximum" row number instead of a total number of returned rows?

Overrides:
useMaxForLimit in class Dialect

supportsLimitOffset

public boolean supportsLimitOffset()
Description copied from class: Dialect
Does this dialect support an offset?

Overrides:
supportsLimitOffset in class Dialect

supportsVariableLimit

public boolean supportsVariableLimit()
Overrides:
supportsVariableLimit in class Dialect

closeQuote

public char closeQuote()
Description copied from class: Dialect
The closing quote for a quoted identifier

Overrides:
closeQuote in class Dialect

openQuote

public char openQuote()
Description copied from class: Dialect
The opening quote for a quoted identifier

Overrides:
openQuote in class Dialect

appendLockHint

public String appendLockHint(LockMode mode,
                             String tableName)
Description copied from class: Dialect
Method appendLockHint appends according to the given lock mode a lock hint behind the given table name, if this dialect needs this. MS SQL Server for example doesn't support the standard "select ... for update" syntax and use a special "select ... from TABLE as ALIAS with (updlock, rowlock) where ..." syntax instead.

Overrides:
appendLockHint in class SybaseDialect

getSelectGUIDString

public String getSelectGUIDString()
Overrides:
getSelectGUIDString in class Dialect

getCurrentTimestampSelectString

public String getCurrentTimestampSelectString()
Overrides:
getCurrentTimestampSelectString in class SybaseDialect