public class SybasePlatform extends DatabasePlatform
Purpose: Provides Sybase ASE specific behavior.
Responsibilities:
DEFAULT_VARCHAR_SIZE| Constructor and Description |
|---|
SybasePlatform() |
| Modifier and Type | Method and Description |
|---|---|
ExpressionOperator |
atan2Operator()
INTERNAL: Build operator.
|
ValueReadQuery |
buildSelectQueryForIdentity()
INTERNAL: Build the identity query for native sequencing.
|
java.lang.Object |
executeStoredProcedure(org.eclipse.persistence.internal.databaseaccess.DatabaseCall dbCall, java.sql.PreparedStatement statement, org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor accessor, org.eclipse.persistence.internal.sessions.AbstractSession session)
because each platform has different requirements for accessing stored procedures and the way that we can combine resultsets and output params the stored procedure call is being executed on the platform.
|
static ExpressionOperator |
extractOperator()
INTERNAL: Derby does not support EXTRACT, but does have DATEPART.
|
java.lang.String |
getBatchDelimiterString()
Used for batch writing and sp defs.
|
java.lang.String |
getCreationInOutputProcedureToken() |
java.lang.String |
getCreationOutputProcedureToken() |
java.lang.String |
getInOutputProcedureToken() |
int |
getJDBCType(java.lang.Class javaType)
Sybase and SQL Anywhere do not support BLOB/CLOB but require LONGVARBINARY/LONGVARCHAR.
|
java.lang.String |
getJdbcTypeName(int jdbcType)
INTERNAL: Returns the type name corresponding to the jdbc type
|
int |
getMaxFieldNameSize()
INTERNAL: returns the maximum number of characters that can be used in a field name on this platform.
|
java.util.Vector |
getNativeTableInfo(java.lang.String table, java.lang.String creator, org.eclipse.persistence.internal.sessions.AbstractSession session)
Return the catalog information through using the native SQL catalog selects.
|
java.lang.String |
getOutputProcedureToken() |
java.lang.String |
getProcedureArgumentString()
Used for sp defs.
|
java.lang.String |
getProcedureCallHeader()
Used for sp calls.
|
java.lang.String |
getSelectForUpdateString() |
java.lang.String |
getStoredProcedureParameterPrefix() |
java.lang.String |
getStoredProcedureTerminationToken()
INTERNAL: This method returns the delimiter between stored procedures in multiple stored procedure calls.
|
org.eclipse.persistence.internal.helper.DatabaseTable |
getTempTableForTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
INTERNAL:
|
ValueReadQuery |
getTimestampQuery()
PUBLIC: This method returns the query to select the timestamp from the server for Sybase.
|
boolean |
isSybase() |
java.util.Hashtable |
maximumNumericValues()
Builds a table of maximum numeric values keyed on java class.
|
java.util.Hashtable |
minimumNumericValues()
Builds a table of minimum numeric values keyed on java class.
|
ExpressionOperator |
modOperator()
Override the default MOD operator.
|
void |
printFieldIdentityClause(java.io.Writer writer)
Append the receiver's field 'identity' constraint clause to a writer.
|
void |
printFieldNullClause(java.io.Writer writer)
Append the receiver's field 'NULL' constraint clause to a writer.
|
void |
registerOutputParameter(java.sql.CallableStatement statement, int index, int jdbcType)
This method is used to register output parameter on Callable Statements for Stored Procedures as each database seems to have a different method.
|
boolean |
requiresProcedureCallBrackets()
USed for sp calls.
|
boolean |
requiresProcedureCallOuputToken()
Used for sp calls.
|
boolean |
requiresTypeNameToRegisterOutputParameter()
INTERNAL: Indicates whether the version of CallableStatement.registerOutputParameter method that takes type name should be used.
|
boolean |
shouldPrintInOutputTokenBeforeType() |
boolean |
shouldPrintLockingClauseAfterWhereClause()
The sybase syntax for obtaining pessimistic lock is "SELECT ADDRESS_ID, ...
|
boolean |
shouldPrintOutputTokenBeforeType() |
boolean |
shouldUseJDBCOuterJoinSyntax()
JDBC defines and outer join syntax, many drivers do not support this.
|
ExpressionOperator |
singleArgumentSubstringOperator()
Override the default SubstringSingleArg operator.
|
boolean |
supportsDeleteOnCascade()
Sybase (as of Sybase ASE 15, does not support delete on cascade).
|
boolean |
supportsGlobalTempTables()
INTERNAL:
|
boolean |
supportsIdentity()
INTERNAL: Indicates whether the platform supports identity.
|
static ExpressionOperator |
trim2Operator()
INTERNAL: Build Trim operator.
|
static ExpressionOperator |
trimOperator()
INTERNAL: Use RTRIM(LTRIM(?))
|
void |
writeUpdateOriginalFromTempTableSql(java.io.Writer writer, org.eclipse.persistence.internal.helper.DatabaseTable table, java.util.Collection pkFields, java.util.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, dontBindUpdateAllQueryUsingTempTables, executeBatch, freeTemporaryObject, getAssignmentString, getBatchBeginString, getBatchEndString, getCastSizeForVarcharParameter, getClassTypes, getConnection, getConstraintDeletionString, getCreateViewString, getCursorCode, getCustomModifyValueForCall, getDefaultSequenceTableName, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIdentifierQuoteCharacter, getIndexNamePrefix, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCTypeForSetNull, getMaxBatchWritingSize, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getObjectFromResultSet, getPartitioningCallback, getPingSQL, getProcedureArgumentSetter, getProcedureAsString, getProcedureBeginString, getProcedureCallTail, getProcedureEndString, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStringBindingSize, getStructConverters, getTableCreationSuffix, getTransactionIsolation, getTypeConverters, getVPDClearIdentifierQuery, getVPDCreationFunctionString, getVPDCreationPolicyString, getVPDDeletionString, getVPDSetIdentifierQuery, hasPartitioningCallback, initialize, initializeConnectionData, isAlterSequenceObjectSupported, isCastRequired, isDynamicSQLRequiredForFunctions, isForUpdateCompatibleWithDistinct, isInformixOuterJoin, isLockTimeoutException, isNullAllowedInSelectClause, isXDBDocument, minimumTimeIncrement, prepareBatchStatement, printFieldNotNullClause, printFieldTypeSize, printFieldUnique, printSQLSelectStatement, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresTableInIndexDropDDL, requiresUniqueConstraintCreationOnTableCreate, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setCastSizeForVarcharParameter, setCursorCode, setIsCastRequired, setMaxBatchWritingSize, setParameterValueInDatabaseCall, setPartitioningCallback, setPingSQL, setPrintInnerJoinInWhereClause, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldCacheAllStatements, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setShouldUseRownumFiltering, setStatementCacheSize, setStringBindingSize, setSupportsAutoCommit, setTableCreationSuffix, setTransactionIsolation, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldAlwaysUseTempStorageForModifyAll, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnUniqueKeys, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintInnerJoinInWhereClause, shouldPrintInputTokenAtStart, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenAtStart, shouldPrintStoredProcedureArgumentNameInCall, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsCountDistinctWithMultipleFields, supportsForeignKeyConstraints, supportsIndexes, supportsIndividualTableLocking, supportsLocalTempTables, supportsLockingQueriesWithMultipleTables, supportsNestingOuterJoins, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsStoredFunctions, supportsTempTables, supportsUniqueColumns, supportsUniqueKeyConstraints, supportsVPD, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, wasFailureCommunicationBased, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeInsertIntoTableSql, writeLOB, writeParameterMarker, writeTableCreationSuffixaddSequence, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, buildSelectQueryForSequenceObject, clone, convertObject, createConnectionCustomizer, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, hasDefaultSequence, initializeDefaultQueries, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isFirebird, isH2, isHSQL, isInformix, isMaxDB, isMySQL, isODBC, isOracle, isOracle9, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeSequence, setConversionManager, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, supportsNativeSequenceNumbers, supportsSequenceObjects, toString, usesPlatformDefaultSequencepublic int getJDBCType(java.lang.Class javaType)
getJDBCType in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic ExpressionOperator atan2Operator()
public ValueReadQuery buildSelectQueryForIdentity()
buildSelectQueryForIdentity in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
public java.lang.Object executeStoredProcedure(org.eclipse.persistence.internal.databaseaccess.DatabaseCall dbCall,
java.sql.PreparedStatement statement,
org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor accessor,
org.eclipse.persistence.internal.sessions.AbstractSession session)
throws java.sql.SQLException
executeStoredProcedure in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformjava.sql.SQLExceptionpublic boolean shouldPrintLockingClauseAfterWhereClause()
shouldPrintLockingClauseAfterWhereClause in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic java.lang.String getSelectForUpdateString()
getSelectForUpdateString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic java.lang.String getBatchDelimiterString()
getBatchDelimiterString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic java.lang.String getCreationInOutputProcedureToken()
getCreationInOutputProcedureToken in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic java.lang.String getCreationOutputProcedureToken()
getCreationOutputProcedureToken in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic java.lang.String getInOutputProcedureToken()
getInOutputProcedureToken in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic java.lang.String getJdbcTypeName(int jdbcType)
getJdbcTypeName in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic int getMaxFieldNameSize()
getMaxFieldNameSize in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.util.Vector getNativeTableInfo(java.lang.String table,
java.lang.String creator,
org.eclipse.persistence.internal.sessions.AbstractSession session)
public java.lang.String getOutputProcedureToken()
getOutputProcedureToken in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic java.lang.String getProcedureArgumentString()
getProcedureArgumentString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic java.lang.String getProcedureCallHeader()
getProcedureCallHeader in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic java.lang.String getStoredProcedureParameterPrefix()
getStoredProcedureParameterPrefix in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic java.lang.String getStoredProcedureTerminationToken()
getStoredProcedureTerminationToken in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic ValueReadQuery getTimestampQuery()
getTimestampQuery in interface org.eclipse.persistence.internal.databaseaccess.PlatformgetTimestampQuery in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformpublic static ExpressionOperator extractOperator()
public static ExpressionOperator trimOperator()
public static ExpressionOperator trim2Operator()
public boolean isSybase()
isSybase in interface org.eclipse.persistence.internal.databaseaccess.PlatformisSybase in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformpublic java.util.Hashtable maximumNumericValues()
NOTE: BigInteger & BigDecimal maximums are dependent upon their precision & Scale
maximumNumericValues in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic java.util.Hashtable minimumNumericValues()
NOTE: BigInteger & BigDecimal minimums are dependent upon their precision & Scale
minimumNumericValues in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic ExpressionOperator modOperator()
public void printFieldIdentityClause(java.io.Writer writer)
throws ValidationException
printFieldIdentityClause in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformValidationException
public void printFieldNullClause(java.io.Writer writer)
throws ValidationException
printFieldNullClause in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformValidationException
public void registerOutputParameter(java.sql.CallableStatement statement,
int index,
int jdbcType)
throws java.sql.SQLException
registerOutputParameter in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformjava.sql.SQLExceptionpublic boolean requiresProcedureCallBrackets()
requiresProcedureCallBrackets in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic boolean requiresProcedureCallOuputToken()
requiresProcedureCallOuputToken in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic boolean requiresTypeNameToRegisterOutputParameter()
requiresTypeNameToRegisterOutputParameter in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic boolean shouldPrintInOutputTokenBeforeType()
shouldPrintInOutputTokenBeforeType in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic boolean shouldPrintOutputTokenBeforeType()
shouldPrintOutputTokenBeforeType in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic boolean shouldUseJDBCOuterJoinSyntax()
shouldUseJDBCOuterJoinSyntax in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic ExpressionOperator singleArgumentSubstringOperator()
public boolean supportsIdentity()
supportsIdentity in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformpublic boolean supportsDeleteOnCascade()
supportsDeleteOnCascade in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic boolean supportsGlobalTempTables()
supportsGlobalTempTables in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic org.eclipse.persistence.internal.helper.DatabaseTable getTempTableForTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
getTempTableForTable in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public void writeUpdateOriginalFromTempTableSql(java.io.Writer writer,
org.eclipse.persistence.internal.helper.DatabaseTable table,
java.util.Collection pkFields,
java.util.Collection assignedFields)
throws java.io.IOException
writeUpdateOriginalFromTempTableSql in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformjava.io.IOException