public class SQLServerPlatform extends DatabasePlatform
Purpose: Provides SQL Server specific behavior.
Responsibilities:
DEFAULT_VARCHAR_SIZE
DEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE, IS_VALID_TIMEOUT, Types_NCLOB, Types_SQLXML
Constructor and Description |
---|
SQLServerPlatform() |
Modifier and Type | Method and Description |
---|---|
ValueReadQuery |
buildSelectQueryForIdentity()
INTERNAL:
Build the identity query for native sequencing.
|
boolean |
dontBindUpdateAllQueryUsingTempTables()
INTERNAL:
In SQLServer local temporary table created by one
PreparedStatement can't be used in another PreparedStatement.
|
static ExpressionOperator |
extractOperator()
INTERNAL:
Derby does not support EXTRACT, but does have DATEPART.
|
String |
getBatchDelimiterString()
Used for batch writing and sp defs.
|
String |
getCreationInOutputProcedureToken()
This method is used to print the required output parameter token for the
specific platform.
|
String |
getCreationOutputProcedureToken()
This method is used to print the required output parameter token for the
specific platform.
|
String |
getInOutputProcedureToken()
This method is used to print the output parameter token when stored
procedures are called
|
int |
getMaxFieldNameSize()
INTERNAL:
returns the maximum number of characters that can be used in a field
name on this platform.
|
Vector |
getNativeTableInfo(String table,
String creator,
AbstractSession session)
Return the catalog information through using the native SQL catalog selects.
|
String |
getOutputProcedureToken()
This method is used to print the output parameter token when stored
procedures are called
|
String |
getProcedureArgumentString()
Used for sp defs.
|
String |
getProcedureCallHeader()
Used for sp calls.
|
String |
getSelectForUpdateNoWaitString()
INTERNAL:
This syntax does no wait on the lock.
|
String |
getSelectForUpdateString()
INTERNAL:
Lock.
|
String |
getStoredProcedureParameterPrefix() |
String |
getStoredProcedureTerminationToken()
INTERNAL:
This method returns the delimiter between stored procedures in multiple stored procedure
calls.
|
DatabaseTable |
getTempTableForTable(DatabaseTable table)
INTERNAL:
|
ValueReadQuery |
getTimestampQuery()
PUBLIC:
This method returns the query to select the timestamp
from the server for SQLServer.
|
boolean |
isOutputAllowWithResultSet()
INTERNAL:
Return true if output parameters can be built with result sets.
|
boolean |
isSQLServer() |
static ExpressionOperator |
locate2Operator()
INTERNAL:
create the Locate2 Operator for this platform
|
Hashtable |
maximumNumericValues()
Builds a table of maximum numeric values keyed on java class.
|
Hashtable |
minimumNumericValues()
Builds a table of minimum numeric values keyed on java class.
|
ExpressionOperator |
modOperator()
Override the default MOD operator.
|
void |
printFieldIdentityClause(Writer writer)
INTERNAL:
Append the receiver's field 'identity' constraint clause to a writer.
|
void |
printFieldNullClause(Writer writer)
INTERNAL:
Append the receiver's field 'NULL' constraint clause to a writer.
|
boolean |
requiresProcedureCallBrackets()
USed for sp calls.
|
boolean |
requiresProcedureCallOuputToken()
Used for sp calls.
|
boolean |
shouldPrintInOutputTokenBeforeType()
This is required in the construction of the stored procedures with
output parameters
|
boolean |
shouldPrintLockingClauseAfterWhereClause()
INTERNAL:
Indicates whether locking clause should be printed after where clause by SQLSelectStatement.
|
boolean |
shouldPrintOutputTokenBeforeType()
This is required in the construction of the stored procedures with
output parameters
|
boolean |
shouldUseJDBCOuterJoinSyntax()
JDBC defines and outer join syntax, many drivers do not support this.
|
ExpressionOperator |
singleArgumentSubstringOperator()
Override the default SubstringSingleArg operator.
|
boolean |
supportsIdentity()
INTERNAL:
Indicates whether the platform supports identity.
|
boolean |
supportsLocalTempTables()
INTERNAL:
|
static ExpressionOperator |
trim2Operator()
INTERNAL:
Build Trim operator.
|
static ExpressionOperator |
trimOperator()
INTERNAL:
Use RTRIM(LTRIM(?)) function for trim.
|
void |
writeUpdateOriginalFromTempTableSql(Writer writer,
DatabaseTable table,
Collection pkFields,
Collection assignedFields)
INTERNAL:
|
addBatch, addStructConverter, allowsSizeInProcedureArguments, appendLiteralToCall, appendParameter, appendParameterInternal, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCallWithReturning, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, buildProcedureCallString, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, canBatchWriteWithOptimisticLocking, canBuildCallWithReturning, commitTransaction, computeMaxRowsForSQL, convertToDatabaseType, copyInto, createArray, createArray, createStruct, createStruct, executeBatch, executeStoredProcedure, freeTemporaryObject, getAssignmentString, getBatchBeginString, getBatchEndString, getBatchRowCountAssignString, getBatchRowCountDeclareString, getBatchRowCountReturnString, getBatchWritingMechanism, getCastSizeForVarcharParameter, getClassTypes, getConnection, getConstraintDeletionString, getCreateDatabaseSchemaString, getCreateViewString, getCursorCode, getCustomModifyValueForCall, getDefaultSequenceTableName, getDropCascadeString, getDropDatabaseSchemaString, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIdentifierQuoteCharacter, getIndexNamePrefix, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJDBCTypeForSetNull, getJdbcTypeName, getMaxBatchWritingSize, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getObjectFromResultSet, getPartitioningCallback, getPingSQL, getProcedureArgumentSetter, getProcedureAsString, getProcedureBeginString, getProcedureCallTail, getProcedureEndString, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateOfString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStringBindingSize, getStructConverters, getTableCreationSuffix, getTransactionIsolation, getTypeConverters, getUniqueConstraintDeletionString, getVPDClearIdentifierQuery, getVPDCreationFunctionString, getVPDCreationPolicyString, getVPDDeletionString, getVPDSetIdentifierQuery, hasPartitioningCallback, initialize, initializeConnectionData, isAlterSequenceObjectSupported, isCastRequired, isDynamicSQLRequiredForFunctions, isForUpdateCompatibleWithDistinct, isInformixOuterJoin, isJDBCExecuteCompliant, isLobCompatibleWithDistinct, isLockTimeoutException, isNullAllowedInSelectClause, isRowCountOutputParameterRequired, isXDBDocument, minimumTimeIncrement, prepareBatchStatement, printFieldNotNullClause, printFieldTypeSize, printFieldUnique, printSQLSelectStatement, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, requiresUniqueConstraintCreationOnTableCreate, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setBatchWritingMechanism, setCastSizeForVarcharParameter, setCursorCode, setDriverName, setIsCastRequired, setMaxBatchWritingSize, setParameterValueInDatabaseCall, setPartitioningCallback, setPingSQL, setPrintInnerJoinInWhereClause, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldCacheAllStatements, setShouldCreateIndicesOnForeignKeys, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setShouldUseRownumFiltering, setStatementCacheSize, setStringBindingSize, setSupportsAutoCommit, setTableCreationSuffix, setTransactionIsolation, setUseJDBCStoredProcedureSyntax, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldAlwaysUseTempStorageForModifyAll, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnForeignKeys, shouldCreateIndicesOnUniqueKeys, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintInnerJoinInWhereClause, shouldPrintInputTokenAtStart, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenAtStart, shouldPrintStoredProcedureArgumentNameInCall, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsCountDistinctWithMultipleFields, supportsDeleteOnCascade, supportsForeignKeyConstraints, supportsGlobalTempTables, supportsIndexes, supportsIndividualTableLocking, supportsLockingQueriesWithMultipleTables, supportsNestingOuterJoins, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsStoredFunctions, supportsTempTables, supportsUniqueColumns, supportsUniqueKeyConstraints, supportsVPD, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, wasFailureCommunicationBased, writeAddColumnClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeInsertIntoTableSql, writeLOB, writeParameterMarker, writeTableCreationSuffix
addSequence, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, buildSelectQueryForSequenceObject, clone, convertObject, createConnectionCustomizer, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultNativeSequenceToTable, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, hasDefaultSequence, initializeDefaultQueries, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isFirebird, isH2, isHANA, isHSQL, isInformix, isMaxDB, isMySQL, isODBC, isOracle, isOracle9, isPervasive, isPointBase, isPostgreSQL, isSQLAnywhere, isSybase, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeSequence, setConversionManager, setDefaultNativeSequenceToTable, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, supportsNativeSequenceNumbers, supportsSequenceObjects, toString, usesPlatformDefaultSequence
public ValueReadQuery buildSelectQueryForIdentity()
buildSelectQueryForIdentity
in class DatasourcePlatform
public boolean dontBindUpdateAllQueryUsingTempTables()
dontBindUpdateAllQueryUsingTempTables
in class DatabasePlatform
public String getBatchDelimiterString()
getBatchDelimiterString
in class DatabasePlatform
public String getCreationInOutputProcedureToken()
getCreationInOutputProcedureToken
in class DatabasePlatform
public String getCreationOutputProcedureToken()
getCreationOutputProcedureToken
in class DatabasePlatform
public String getInOutputProcedureToken()
getInOutputProcedureToken
in class DatabasePlatform
public int getMaxFieldNameSize()
getMaxFieldNameSize
in class DatabasePlatform
public Vector getNativeTableInfo(String table, String creator, AbstractSession session)
public String getOutputProcedureToken()
getOutputProcedureToken
in class DatabasePlatform
public String getProcedureArgumentString()
getProcedureArgumentString
in class DatabasePlatform
public String getProcedureCallHeader()
getProcedureCallHeader
in class DatabasePlatform
public String getStoredProcedureParameterPrefix()
getStoredProcedureParameterPrefix
in class DatabasePlatform
public String getStoredProcedureTerminationToken()
getStoredProcedureTerminationToken
in class DatabasePlatform
public ValueReadQuery getTimestampQuery()
getTimestampQuery
in interface Platform
getTimestampQuery
in class DatasourcePlatform
public String getSelectForUpdateString()
getSelectForUpdateString
in class DatabasePlatform
public String getSelectForUpdateNoWaitString()
getSelectForUpdateNoWaitString
in class DatabasePlatform
public boolean shouldPrintLockingClauseAfterWhereClause()
shouldPrintLockingClauseAfterWhereClause
in class DatabasePlatform
public static ExpressionOperator extractOperator()
public static ExpressionOperator trimOperator()
public static ExpressionOperator trim2Operator()
public boolean isOutputAllowWithResultSet()
isOutputAllowWithResultSet
in class DatabasePlatform
public boolean isSQLServer()
isSQLServer
in interface Platform
isSQLServer
in class DatasourcePlatform
public Hashtable maximumNumericValues()
NOTE: BigInteger & BigDecimal maximums are dependent upon their precision & Scale
maximumNumericValues
in class DatabasePlatform
public Hashtable minimumNumericValues()
NOTE: BigInteger & BigDecimal minimums are dependent upon their precision & Scale
minimumNumericValues
in class DatabasePlatform
public ExpressionOperator modOperator()
public ExpressionOperator singleArgumentSubstringOperator()
public static ExpressionOperator locate2Operator()
public void printFieldIdentityClause(Writer writer) throws ValidationException
printFieldIdentityClause
in class DatabasePlatform
ValidationException
public void printFieldNullClause(Writer writer) throws ValidationException
printFieldNullClause
in class DatabasePlatform
ValidationException
public boolean requiresProcedureCallBrackets()
requiresProcedureCallBrackets
in class DatabasePlatform
public boolean requiresProcedureCallOuputToken()
requiresProcedureCallOuputToken
in class DatabasePlatform
public boolean shouldPrintInOutputTokenBeforeType()
shouldPrintInOutputTokenBeforeType
in class DatabasePlatform
public boolean shouldPrintOutputTokenBeforeType()
shouldPrintOutputTokenBeforeType
in class DatabasePlatform
public boolean shouldUseJDBCOuterJoinSyntax()
shouldUseJDBCOuterJoinSyntax
in class DatabasePlatform
public boolean supportsIdentity()
supportsIdentity
in class DatasourcePlatform
public boolean supportsLocalTempTables()
supportsLocalTempTables
in class DatabasePlatform
public DatabaseTable getTempTableForTable(DatabaseTable table)
getTempTableForTable
in class DatabasePlatform
public void writeUpdateOriginalFromTempTableSql(Writer writer, DatabaseTable table, Collection pkFields, Collection assignedFields) throws IOException
writeUpdateOriginalFromTempTableSql
in class DatabasePlatform
IOException
EclipseLink 2.5.2, "build v20140319-9ad6abd" API Reference