Module org.eclipse.persistence.core
Class SQLServerPlatform
java.lang.Object
org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
org.eclipse.persistence.platform.database.DatabasePlatform
org.eclipse.persistence.platform.database.SQLServerPlatform
- All Implemented Interfaces:
Serializable,Cloneable,CorePlatform<ConversionManager>,Platform
Purpose: Provides SQL Server specific behavior.
Responsibilities:
- Native SQL for byte[], Date, Time, & Timestamp.
- Native sequencing using @@IDENTITY.
- Since:
- TOPLink/Java 1.0
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.persistence.platform.database.DatabasePlatform
DEFAULT_VARCHAR_SIZEFields inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
batchWritingMechanism, castSizeForVarcharParameter, classTypes, cursorCode, DEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE, driverName, driverSupportsNationalCharacterVarying, fieldTypes, IS_VALID_TIMEOUT, isCastRequired, maxBatchWritingSize, partitioningCallback, pingSQL, printInnerJoinInWhereClause, printOuterJoinInWhereClause, shouldBindAllParameters, shouldBindLiterals, shouldBindPartialParameters, shouldCacheAllStatements, shouldCreateIndicesOnForeignKeys, shouldForceBindAllParameters, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldOptimizeDataConversion, shouldTrimStrings, statementCacheSize, storedProcedureTerminationToken, stringBindingSize, structConverters, supportsAutoCommit, tableCreationSuffix, transactionIsolation, typeConverters, useJDBCStoredProcedureSyntax, useNationalCharacterVarying, useRownumFiltering, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesStreamsForBinding, usesStringBindingFields inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
conversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultNativeSequenceToTable, defaultSeqenceAtNextValue, defaultSequence, endDelimiter, platformOperators, sequences, sequencesLock, startDelimiter, supportsReturnGeneratedKeys, tableQualifier, timestampQuery, uuidQuery -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static ExpressionOperatorINTERNAL: Function, to add months to a date.protected voidappendByteArray(byte[] bytes, Writer writer) If using native SQL then print a byte[] as '0xFF...'protected voidappendCalendar(Calendar calendar, Writer writer) Answer a platform correct string representation of a Calendar, suitable for SQL generation.protected voidappendDate(Date date, Writer writer) Answer a platform correct string representation of a Date, suitable for SQL generation.protected voidappendSybaseCalendar(Calendar calendar, Writer writer) Write a timestamp in Sybase specific format ( yyyy-mm-dd-hh.mm.ss.fff)protected voidappendSybaseTimestamp(Timestamp timestamp, Writer writer) Write a timestamp in Sybase specific format ( yyyy-mm-dd-hh.mm.ss.fff)protected voidappendTime(Time time, Writer writer) Answer a platform correct string representation of a Time, suitable for SQL generation.protected voidappendTimestamp(Timestamp timestamp, Writer writer) Answer a platform correct string representation of a Timestamp, suitable for SQL generation.Return the mapping of class types to database types for the schema framework.protected Hashtable<Class<?>, FieldTypeDefinition> Return the mapping of class types to database types for the schema framework.INTERNAL: Build the identity query for native sequencing.buildSelectQueryForSequenceObject(String qualifiedSeqName, Integer size) INTERNAL: Produce a DataReadQuery which updates(!) the sequence number in the database and returns it.INTERNAL: Get platform specific connection properties.booleanINTERNAL: In SQLServer local temporary table created by one PreparedStatement can't be used in another PreparedStatement.Used for batch writing and sp defs.protected StringINTERNAL:This method is used to print the required output parameter token for the specific platform.This method is used to print the required output parameter token for the specific platform.This method is used to print the output parameter token when stored procedures are calledintINTERNAL: returns the maximum number of characters that can be used in a field name on this platform.getNativeTableInfo(String table, String creator, AbstractSession session) Return the catalog information through using the native SQL catalog selects.getObjectFromResultSet(ResultSet resultSet, int columnNumber, int type, AbstractSession session) INTERNAL: Get the object from the JDBC Result set.This method is used to print the output parameter token when stored procedures are calledUsed for sp defs.Used for sp calls.INTERNAL: This syntax does no wait on the lock.INTERNAL: Lock.INTERNAL:PUBLIC: This method returns the query to select the timestamp from the server for SQLServer.voidinitializeConnectionData(Connection connection) INTERNAL: Allow initialization from the connection.protected voidInitialize any platform-specific operatorsprotected static ExpressionOperatorINTERNAL: Build instring operatorbooleanINTERNAL: Return true if output parameters can be built with result sets.booleanprotected static ExpressionOperatorINTERNAL: create the Locate2 Operator for this platformprotected static ExpressionOperatorINTERNAL: Build the Sybase equivalent to LocateBuilds a table of maximum numeric values keyed on java class.Builds a table of minimum numeric values keyed on java class.protected ExpressionOperatorOverride the default MOD operator.protected static ExpressionOperatorvoidprintFieldIdentityClause(Writer writer) INTERNAL: Append the receiver's field 'identity' constraint clause to a writer.voidprintFieldNullClause(Writer writer) INTERNAL: Append the receiver's field 'NULL' constraint clause to a writer.voidprintSQLSelectStatement(DatabaseCall call, ExpressionSQLPrinter printer, SQLSelectStatement statement) INTERNAL: Print the SQL representation of the statement on a stream, storing the fields in the DatabaseCall.booleanUSed for sp calls.booleanUsed for sp calls.voidsetDriverSupportsOffsetDateTime(boolean driverSupportsOffsetDateTime) Allow user to turn off ODT support, in case they rely on the old behavior.voidsetParameterValueInDatabaseCall(Object parameter, CallableStatement statement, String name, AbstractSession session) INTERNAL Set the parameter in the JDBC statement with the given name.voidsetParameterValueInDatabaseCall(Object parameter, PreparedStatement statement, int index, AbstractSession session) INTERNAL Set the parameter in the JDBC statement at the given index.booleanThis is required in the construction of the stored procedures with output parametersbooleanINTERNAL: Indicates whether locking clause should be printed after where clause by SQLSelectStatement.booleanThis is required in the construction of the stored procedures with output parametersbooleanJDBC defines and outer join syntax, many drivers do not support this.protected static ExpressionOperatorOverride the default SubstringSingleArg operator.booleanINTERNAL: Indicates whether the platform supports identity.booleanINTERNAL:booleanINTERNAL:protected static ExpressionOperatorINTERNAL: Build Sybase equivalent to TO_CHAR.protected static ExpressionOperatorINTERNAL: Build Sybase equivalent to TO_DATE.protected static ExpressionOperatorINTERNAL: Build Sybase equivalent to TO_CHAR.protected static ExpressionOperatorINTERNAL: Build Sybase equivalent to TO_NUMBER.protected static ExpressionOperatorINTERNAL: Build Trim operator.protected static ExpressionOperatorINTERNAL: Use RTRIM(LTRIM(?)) function for trim.voidwriteUpdateOriginalFromTempTableSql(Writer writer, DatabaseTable table, Collection<DatabaseField> pkFields, Collection<DatabaseField> assignedFields) INTERNAL:Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
addBatch, addStructConverter, allowBindingForSelectClause, allowsSizeInProcedureArguments, appendBoolean, appendLiteralToCall, appendLiteralToCallWithBinding, appendNumber, appendParameter, appendParameterInternal, appendString, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCallWithReturning, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, buildProcedureCallString, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, canBatchWriteWithOptimisticLocking, canBuildCallWithReturning, checkTableExists, commitTransaction, computeMaxRowsForSQL, convertToDatabaseType, copyInto, createArray, createArray, createPlatformDefaultSequence, createStruct, createStruct, createStruct, executeBatch, executeStoredProcedure, freeTemporaryObject, getAssignmentString, getBatchBeginString, getBatchEndString, getBatchRowCountAssignString, getBatchRowCountDeclareString, getBatchRowCountReturnString, getBatchWritingMechanism, getCastSizeForVarcharParameter, getClassTypes, getConnection, getConnectionUserName, getConstraintDeletionString, getCreateDatabaseSchemaString, getCreateTempTableSqlBodyForTable, getCreateTempTableSqlSuffix, getCreateViewString, getCursorCode, getCustomModifyValueForCall, getDefaultSequenceTableName, getDriverSupportsNVarChar, getDropCascadeString, getDropDatabaseSchemaString, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIndexNamePrefix, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJDBCTypeForSetNull, getJdbcTypeName, getJsonPlatform, getMaxBatchWritingSize, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getParameterValueFromDatabaseCall, getParameterValueFromDatabaseCall, getPartitioningCallback, getPingSQL, getProcedureArgument, getProcedureAsString, getProcedureBeginString, getProcedureCallTail, getProcedureEndString, getProcedureOptionList, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateOfString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, getTableCreationSuffix, getTableExistsQuery, getTransactionIsolation, getTypeConverters, getUniqueConstraintDeletionString, getUseNationalCharacterVaryingTypeForString, getVPDClearIdentifierQuery, getVPDCreationFunctionString, getVPDCreationPolicyString, getVPDDeletionString, getVPDSetIdentifierQuery, hasPartitioningCallback, initialize, isAlterSequenceObjectSupported, isCastRequired, isDynamicSQLRequiredForFunctions, isForUpdateCompatibleWithDistinct, isInformixOuterJoin, isJDBCExecuteCompliant, isLobCompatibleWithDistinct, isLockTimeoutException, isNullAllowedInSelectClause, isRowCountOutputParameterRequired, isXDBDocument, minimumTimeIncrement, prepareBatchStatement, printFieldNotNullClause, printFieldTypeSize, printFieldTypeSize, printFieldUnique, printFieldUnique, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, registerOutputParameter, registerOutputParameter, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, requiresUniqueConstraintCreationOnTableCreate, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setBatchWritingMechanism, setCastSizeForVarcharParameter, setClassTypes, setCursorCode, setDriverName, setDriverSupportsNVarChar, setFieldTypes, setIsCastRequired, setMaxBatchWritingSize, setNullFromDatabaseField, setNullFromDatabaseField, setPartitioningCallback, setPingSQL, setPrintInnerJoinInWhereClause, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldBindPartialParameters, setShouldCacheAllStatements, setShouldCreateIndicesOnForeignKeys, setShouldForceBindAllParameters, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setShouldUseRownumFiltering, setStatementCacheSize, setStoredProcedureTerminationToken, setStringBindingSize, setSupportsAutoCommit, setTableCreationSuffix, setTransactionIsolation, setUseJDBCStoredProcedureSyntax, setUseNationalCharacterVaryingTypeForString, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldAlwaysUseTempStorageForModifyAll, shouldBindAllParameters, shouldBindLiterals, shouldBindPartialParameters, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnForeignKeys, shouldCreateIndicesOnUniqueKeys, shouldForceBindAllParameters, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintForUpdateClause, shouldPrintInnerJoinInWhereClause, shouldPrintInputTokenAtStart, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenAtStart, shouldPrintStoredProcedureArgumentNameInCall, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTempTableSpecifyPrimaryKeys, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseGetSetNString, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsConnectionUserName, supportsCountDistinctWithMultipleFields, supportsDeleteOnCascade, supportsForeignKeyConstraints, supportsGlobalTempTables, supportsIndexes, supportsIndividualTableLocking, supportsLockingQueriesWithMultipleTables, supportsNestingOuterJoins, supportsOrderByParameters, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsStoredFunctions, supportsTempTables, supportsUniqueColumns, supportsUniqueKeyConstraints, supportsVPD, supportsWaitForUpdate, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, wasFailureCommunicationBased, writeAddColumnClause, writeAutoAssignmentSetClause, writeAutoJoinWhereClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeFields, writeFieldsAutoClause, writeFieldsList, writeInsertIntoTableSql, writeJoinWhereClause, writeLOB, writeParameterMarker, writeTableCreationSuffixMethods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
addOperator, addSequence, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, clone, convertObject, convertObject, createConnectionCustomizer, createExpressionFor, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultNativeSequenceToTable, getDefaultSeqenceAtNextValue, getDefaultSequence, getDefaultSequenceToWrite, getDriverVersion, getEndDelimiter, getINClauseLimit, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, getUUIDQuery, hasDefaultSequence, initializeDefaultQueries, initIdentitySequences, isAccess, isAttunity, isCloudscape, isDB2, isDB2Z, isDBase, isDerby, isFirebird, isH2, isHANA, isHSQL, isInformix, isMariaDB, isMaxDB, isMySQL, isODBC, isOracle, isOracle12, isOracle21, isOracle23, isOracle9, isPervasive, isPointBase, isPostgreSQL, isSQLAnywhere, isSybase, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeIdentitySequences, removeSequence, sequencesAfterCloneCleanup, setConversionManager, setDefaultNativeSequenceToTable, setDefaultSeqenceAtNextValue, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setSupportsReturnGeneratedKeys, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, setUUIDQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, supportsNativeSequenceNumbers, supportsReturnGeneratedKeys, toString, usesPlatformDefaultSequence
-
Constructor Details
-
SQLServerPlatform
public SQLServerPlatform()
-
-
Method Details
-
connectionProperties
Description copied from interface:PlatformINTERNAL: Get platform specific connection properties.- Returns:
- properties to be added to connection properties
-
initializeConnectionData
Description copied from class:DatabasePlatformINTERNAL: Allow initialization from the connection.- Overrides:
initializeConnectionDatain classDatabasePlatform- Throws:
SQLException
-
setDriverSupportsOffsetDateTime
public void setDriverSupportsOffsetDateTime(boolean driverSupportsOffsetDateTime) Allow user to turn off ODT support, in case they rely on the old behavior. -
appendByteArray
If using native SQL then print a byte[] as '0xFF...'- Overrides:
appendByteArrayin classDatabasePlatform- Throws:
IOException
-
appendDate
Answer a platform correct string representation of a Date, suitable for SQL generation. Native format: 'yyyy-mm-dd- Overrides:
appendDatein classDatabasePlatform- Throws:
IOException
-
appendSybaseTimestamp
Write a timestamp in Sybase specific format ( yyyy-mm-dd-hh.mm.ss.fff)- Throws:
IOException
-
appendSybaseCalendar
Write a timestamp in Sybase specific format ( yyyy-mm-dd-hh.mm.ss.fff)- Throws:
IOException
-
appendTime
Answer a platform correct string representation of a Time, suitable for SQL generation. The time is printed in the ODBC platform independent format {t'hh:mm:ss'}.- Overrides:
appendTimein classDatabasePlatform- Throws:
IOException
-
appendTimestamp
Answer a platform correct string representation of a Timestamp, suitable for SQL generation. The date is printed in the ODBC platform independent format {d'YYYY-MM-DD'}.- Overrides:
appendTimestampin classDatabasePlatform- Throws:
IOException
-
appendCalendar
Answer a platform correct string representation of a Calendar, suitable for SQL generation. The date is printed in the ODBC platform independent format {d'YYYY-MM-DD'}.- Overrides:
appendCalendarin classDatabasePlatform- Throws:
IOException
-
buildClassTypes
Description copied from class:DatabasePlatformReturn the mapping of class types to database types for the schema framework.- Overrides:
buildClassTypesin classDatabasePlatform
-
buildFieldTypes
Description copied from class:DatabasePlatformReturn the mapping of class types to database types for the schema framework.- Overrides:
buildFieldTypesin classDatabasePlatform
-
buildSelectQueryForIdentity
INTERNAL: Build the identity query for native sequencing.- Overrides:
buildSelectQueryForIdentityin classDatasourcePlatform
-
buildSelectQueryForSequenceObject
INTERNAL: Produce a DataReadQuery which updates(!) the sequence number in the database and returns it.- Overrides:
buildSelectQueryForSequenceObjectin classDatasourcePlatform- Parameters:
qualifiedSeqName- a defined database sequence
-
dontBindUpdateAllQueryUsingTempTables
public boolean dontBindUpdateAllQueryUsingTempTables()INTERNAL: In SQLServer local temporary table created by one PreparedStatement can't be used in another PreparedStatement. Workaround is to use Statement instead of PreparedStatement.- Overrides:
dontBindUpdateAllQueryUsingTempTablesin classDatabasePlatform
-
getBatchDelimiterString
Used for batch writing and sp defs.- Overrides:
getBatchDelimiterStringin classDatabasePlatform
-
getCreationInOutputProcedureToken
This method is used to print the required output parameter token for the specific platform. Used when stored procedures are created.- Overrides:
getCreationInOutputProcedureTokenin classDatabasePlatform
-
getCreationOutputProcedureToken
This method is used to print the required output parameter token for the specific platform. Used when stored procedures are created.- Overrides:
getCreationOutputProcedureTokenin classDatabasePlatform
-
getInOutputProcedureToken
This method is used to print the output parameter token when stored procedures are called- Overrides:
getInOutputProcedureTokenin classDatabasePlatform
-
getMaxFieldNameSize
public int getMaxFieldNameSize()INTERNAL: returns the maximum number of characters that can be used in a field name on this platform.- Overrides:
getMaxFieldNameSizein classDatabasePlatform
-
getNativeTableInfo
Return the catalog information through using the native SQL catalog selects. This is required because many JDBC driver do not support meta-data. Willcards can be passed as arguments. -
getOutputProcedureToken
This method is used to print the output parameter token when stored procedures are called- Overrides:
getOutputProcedureTokenin classDatabasePlatform
-
getProcedureArgumentString
Used for sp defs.- Overrides:
getProcedureArgumentStringin classDatabasePlatform
-
getProcedureCallHeader
Used for sp calls.- Overrides:
getProcedureCallHeaderin classDatabasePlatform
-
getStoredProcedureParameterPrefix
- Overrides:
getStoredProcedureParameterPrefixin classDatabasePlatform
-
getTimestampQuery
PUBLIC: This method returns the query to select the timestamp from the server for SQLServer.- Specified by:
getTimestampQueryin interfacePlatform- Overrides:
getTimestampQueryin classDatasourcePlatform
-
getSelectForUpdateString
INTERNAL: Lock. UPDLOCK seems like the correct table hint to use: HOLDLOCK is too weak - doesn't lock out another read with HOLDLOCK, XLOCK is too strong - locks out another read which doesn't use any locks. UPDLOCK seems to behave exactly like Oracle's FOR UPDATE: locking out updates and other reads with FOR UPDATE but allowing other reads without locks. SQLServer seems to decide itself on the granularity of the lock - it could lock more than the returned rows (for instance a page). It could be forced to obtain to make sure to obtain row level lock: WITH (UPDLOCK, ROWLOCK) However this approach is strongly discouraged because it can consume too much resources: selecting 900 rows from and requiring a "personal" lock for each row may not be feasible because of not enough memory available at the moment - in that case SQLServer will wait until the resource becomes available.- Overrides:
getSelectForUpdateStringin classDatabasePlatform
-
getSelectForUpdateNoWaitString
INTERNAL: This syntax does no wait on the lock.- Overrides:
getSelectForUpdateNoWaitStringin classDatabasePlatform
-
shouldPrintLockingClauseAfterWhereClause
public boolean shouldPrintLockingClauseAfterWhereClause()INTERNAL: Indicates whether locking clause should be printed after where clause by SQLSelectStatement. Example: on Oracle platform (method returns true): SELECT ADDRESS_ID, ... FROM ADDRESS WHERE (ADDRESS_ID = ?) FOR UPDATE on SQLServer platform (method returns false): SELECT ADDRESS_ID, ... FROM ADDRESS WITH (UPDLOCK) WHERE (ADDRESS_ID = ?)- Overrides:
shouldPrintLockingClauseAfterWhereClausein classDatabasePlatform
-
initializePlatformOperators
protected void initializePlatformOperators()Initialize any platform-specific operators- Overrides:
initializePlatformOperatorsin classDatasourcePlatform
-
trimOperator
INTERNAL: Use RTRIM(LTRIM(?)) function for trim. -
trim2Operator
INTERNAL: Build Trim operator. -
maximumNumericValues
Builds a table of maximum numeric values keyed on java class. This is used for type testing but might also be useful to end users attempting to sanitize values.NOTE: BigInteger & BigDecimal maximums are dependent upon their precision & Scale
- Overrides:
maximumNumericValuesin classDatabasePlatform
-
minimumNumericValues
Builds a table of minimum numeric values keyed on java class. This is used for type testing but might also be useful to end users attempting to sanitize values.NOTE: BigInteger & BigDecimal minimums are dependent upon their precision & Scale
- Overrides:
minimumNumericValuesin classDatabasePlatform
-
modOperator
Override the default MOD operator. -
singleArgumentSubstringOperator
Override the default SubstringSingleArg operator. -
operatorOuterJoin
-
locate2Operator
INTERNAL: create the Locate2 Operator for this platform -
addMonthsOperator
INTERNAL: Function, to add months to a date. -
inStringOperator
INTERNAL: Build instring operator -
toNumberOperator
INTERNAL: Build Sybase equivalent to TO_NUMBER. -
toDateToStringOperator
INTERNAL: Build Sybase equivalent to TO_CHAR. -
toDateOperator
INTERNAL: Build Sybase equivalent to TO_DATE. -
toCharOperator
INTERNAL: Build Sybase equivalent to TO_CHAR. -
locateOperator
INTERNAL: Build the Sybase equivalent to Locate -
isOutputAllowWithResultSet
public boolean isOutputAllowWithResultSet()INTERNAL: Return true if output parameters can be built with result sets.- Overrides:
isOutputAllowWithResultSetin classDatabasePlatform
-
isSQLServer
public boolean isSQLServer()- Specified by:
isSQLServerin interfacePlatform- Overrides:
isSQLServerin classDatasourcePlatform
-
printFieldIdentityClause
INTERNAL: Append the receiver's field 'identity' constraint clause to a writer.- Overrides:
printFieldIdentityClausein classDatabasePlatform- Throws:
ValidationException
-
printFieldNullClause
INTERNAL: Append the receiver's field 'NULL' constraint clause to a writer.- Overrides:
printFieldNullClausein classDatabasePlatform- Throws:
ValidationException
-
requiresProcedureCallBrackets
public boolean requiresProcedureCallBrackets()USed for sp calls.- Overrides:
requiresProcedureCallBracketsin classDatabasePlatform
-
requiresProcedureCallOuputToken
public boolean requiresProcedureCallOuputToken()Used for sp calls. Sybase must print output after output params.- Overrides:
requiresProcedureCallOuputTokenin classDatabasePlatform
-
shouldPrintInOutputTokenBeforeType
public boolean shouldPrintInOutputTokenBeforeType()This is required in the construction of the stored procedures with output parameters- Overrides:
shouldPrintInOutputTokenBeforeTypein classDatabasePlatform
-
shouldPrintOutputTokenBeforeType
public boolean shouldPrintOutputTokenBeforeType()This is required in the construction of the stored procedures with output parameters- Overrides:
shouldPrintOutputTokenBeforeTypein classDatabasePlatform
-
shouldUseJDBCOuterJoinSyntax
public boolean shouldUseJDBCOuterJoinSyntax()JDBC defines and outer join syntax, many drivers do not support this. So we normally avoid it.- Overrides:
shouldUseJDBCOuterJoinSyntaxin classDatabasePlatform
-
supportsIdentity
public boolean supportsIdentity()INTERNAL: Indicates whether the platform supports identity. SQLServer does through IDENTITY field types. This method is to be used *ONLY* by sequencing classes- Overrides:
supportsIdentityin classDatasourcePlatform
-
supportsSequenceObjects
public boolean supportsSequenceObjects()INTERNAL:- Overrides:
supportsSequenceObjectsin classDatasourcePlatform
-
supportsLocalTempTables
public boolean supportsLocalTempTables()INTERNAL:- Overrides:
supportsLocalTempTablesin classDatabasePlatform
-
getCreateTempTableSqlPrefix
INTERNAL:- Overrides:
getCreateTempTableSqlPrefixin classDatabasePlatform
-
getTempTableForTable
INTERNAL:- Overrides:
getTempTableForTablein classDatabasePlatform- Parameters:
table- is original table for which temp table is created.- Returns:
- temporary table
-
writeUpdateOriginalFromTempTableSql
public void writeUpdateOriginalFromTempTableSql(Writer writer, DatabaseTable table, Collection<DatabaseField> pkFields, Collection<DatabaseField> assignedFields) throws IOException INTERNAL:- Overrides:
writeUpdateOriginalFromTempTableSqlin classDatabasePlatform- Parameters:
writer- for writing the sqltable- is original table for which temp table is created.pkFields- primary key fields for the original table.assignedFields- fields to be assigned a new value.- Throws:
IOException
-
printSQLSelectStatement
public void printSQLSelectStatement(DatabaseCall call, ExpressionSQLPrinter printer, SQLSelectStatement statement) Description copied from class:DatabasePlatformINTERNAL: Print the SQL representation of the statement on a stream, storing the fields in the DatabaseCall.- Overrides:
printSQLSelectStatementin classDatabasePlatform
-
getObjectFromResultSet
public Object getObjectFromResultSet(ResultSet resultSet, int columnNumber, int type, AbstractSession session) throws SQLException Description copied from class:DatabasePlatformINTERNAL: Get the object from the JDBC Result set. Added to allow other platforms to override.- Overrides:
getObjectFromResultSetin classDatabasePlatform- Throws:
SQLException- See Also:
-
setParameterValueInDatabaseCall
public void setParameterValueInDatabaseCall(Object parameter, PreparedStatement statement, int index, AbstractSession session) throws SQLException Description copied from class:DatabasePlatformINTERNAL Set the parameter in the JDBC statement at the given index. This support a wide range of different parameter types, and is heavily optimized for common types.- Overrides:
setParameterValueInDatabaseCallin classDatabasePlatform- Throws:
SQLException
-
setParameterValueInDatabaseCall
public void setParameterValueInDatabaseCall(Object parameter, CallableStatement statement, String name, AbstractSession session) throws SQLException Description copied from class:DatabasePlatformINTERNAL Set the parameter in the JDBC statement with the given name. This support a wide range of different parameter types, and is heavily optimized for common types.- Overrides:
setParameterValueInDatabaseCallin classDatabasePlatform- Throws:
SQLException
-