public class SybasePlatform extends DatabasePlatform
Purpose: Provides Sybase ASE specific behavior.
Responsibilities:
DEFAULT_VARCHAR_SIZE
DEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE, IS_VALID_TIMEOUT, shouldIgnoreCaseOnFieldComparisons, Types_NCLOB, Types_SQLXML
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.
|
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()
This method is used to print the required output parameter token for the
specific platform.
|
java.lang.String |
getCreationOutputProcedureToken()
This method is used to print the required output parameter token for the
specific platform.
|
java.lang.String |
getInOutputProcedureToken()
This method is used to print the output parameter token when stored
procedures are called
|
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,
AbstractSession session)
Return the catalog information through using the native SQL catalog selects.
|
java.lang.String |
getOutputProcedureToken()
This method is used to print the output parameter token when stored
procedures are called
|
java.lang.String |
getProcedureArgumentString()
Used for sp defs.
|
java.lang.String |
getProcedureCallHeader()
Used for sp calls.
|
java.lang.String |
getProcedureCallTail()
Used for sp calls.
|
java.lang.String |
getSelectForUpdateString()
Most database support a syntax.
|
java.lang.String |
getStoredProcedureParameterPrefix() |
DatabaseTable |
getTempTableForTable(DatabaseTable table)
INTERNAL:
|
ValueReadQuery |
getTimestampQuery()
PUBLIC:
This method returns the query to select the timestamp
from the server for Sybase.
|
void |
initializeConnectionData(java.sql.Connection connection)
INTERNAL:
Allow initialization from the connection.
|
boolean |
isOutputAllowWithResultSet()
INTERNAL:
Return true if output parameters can be built with result sets.
|
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()
This is required in the construction of the stored procedures with
output parameters
|
boolean |
shouldPrintLockingClauseAfterWhereClause()
The sybase syntax for obtaining pessimistic lock is "SELECT ADDRESS_ID, ...
|
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 |
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(?)) function for trim.
|
boolean |
useJDBCStoredProcedureSyntax()
Return true if this platform is to use the JDBC supported syntax for executing stored procedures.
|
void |
writeUpdateOriginalFromTempTableSql(java.io.Writer writer,
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, executeStoredProcedure, freeTemporaryObject, getAssignmentString, getBatchBeginString, getBatchEndString, getBatchRowCountAssignString, getBatchRowCountDeclareString, getBatchRowCountReturnString, getBatchWritingMechanism, getCastSizeForVarcharParameter, getClassTypes, getConnection, getConnectionUserName, getConstraintDeletionString, getCreateDatabaseSchemaString, getCreateViewString, getCursorCode, getCustomModifyValueForCall, getDefaultSequenceTableName, getDriverSupportsNVarChar, getDropCascadeString, getDropDatabaseSchemaString, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIdentifierQuoteCharacter, getIndexNamePrefix, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCTypeForSetNull, getMaxBatchWritingSize, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getObjectFromResultSet, getPartitioningCallback, getPingSQL, getProcedureArgumentSetter, getProcedureAsString, getProcedureBeginString, getProcedureEndString, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, getTableCreationSuffix, 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, printFieldUnique, printSQLSelectStatement, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresTableInIndexDropDDL, requiresUniqueConstraintCreationOnTableCreate, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setBatchWritingMechanism, setCastSizeForVarcharParameter, setCursorCode, setDriverName, setDriverSupportsNVarChar, setIsCastRequired, setMaxBatchWritingSize, setParameterValueInDatabaseCall, setPartitioningCallback, setPingSQL, setPrintInnerJoinInWhereClause, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldCacheAllStatements, setShouldCreateIndicesOnForeignKeys, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setShouldUseRownumFiltering, setStatementCacheSize, setStoredProcedureTerminationToken, setStringBindingSize, setSupportsAutoCommit, setTableCreationSuffix, setTransactionIsolation, setUseJDBCStoredProcedureSyntax, setUseNationalCharacterVaryingTypeForString, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldAlwaysUseTempStorageForModifyAll, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnForeignKeys, shouldCreateIndicesOnUniqueKeys, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintForUpdateClause, shouldPrintInnerJoinInWhereClause, shouldPrintInputTokenAtStart, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenAtStart, shouldPrintStoredProcedureArgumentNameInCall, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseGetSetNString, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsConnectionUserName, supportsCountDistinctWithMultipleFields, supportsForeignKeyConstraints, supportsIndexes, supportsIndividualTableLocking, supportsLocalTempTables, 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, isSQLServer, 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 void initializeConnectionData(java.sql.Connection connection) throws java.sql.SQLException
DatabasePlatform
initializeConnectionData
in class DatabasePlatform
java.sql.SQLException
public int getJDBCType(java.lang.Class javaType)
getJDBCType
in class DatabasePlatform
public ExpressionOperator atan2Operator()
public ValueReadQuery buildSelectQueryForIdentity()
buildSelectQueryForIdentity
in class DatasourcePlatform
public boolean shouldPrintLockingClauseAfterWhereClause()
shouldPrintLockingClauseAfterWhereClause
in class DatabasePlatform
public java.lang.String getSelectForUpdateString()
DatabasePlatform
getSelectForUpdateString
in class DatabasePlatform
public java.lang.String getBatchDelimiterString()
getBatchDelimiterString
in class DatabasePlatform
public java.lang.String getCreationInOutputProcedureToken()
DatabasePlatform
getCreationInOutputProcedureToken
in class DatabasePlatform
public java.lang.String getCreationOutputProcedureToken()
DatabasePlatform
getCreationOutputProcedureToken
in class DatabasePlatform
public java.lang.String getInOutputProcedureToken()
DatabasePlatform
getInOutputProcedureToken
in class DatabasePlatform
public java.lang.String getJdbcTypeName(int jdbcType)
getJdbcTypeName
in class DatabasePlatform
public int getMaxFieldNameSize()
getMaxFieldNameSize
in class DatabasePlatform
public java.util.Vector getNativeTableInfo(java.lang.String table, java.lang.String creator, AbstractSession session)
public java.lang.String getOutputProcedureToken()
DatabasePlatform
getOutputProcedureToken
in class DatabasePlatform
public java.lang.String getProcedureArgumentString()
getProcedureArgumentString
in class DatabasePlatform
public java.lang.String getProcedureCallHeader()
getProcedureCallHeader
in class DatabasePlatform
public java.lang.String getProcedureCallTail()
DatabasePlatform
getProcedureCallTail
in class DatabasePlatform
public boolean useJDBCStoredProcedureSyntax()
public java.lang.String getStoredProcedureParameterPrefix()
getStoredProcedureParameterPrefix
in class DatabasePlatform
public ValueReadQuery getTimestampQuery()
getTimestampQuery
in interface Platform
getTimestampQuery
in class DatasourcePlatform
public static ExpressionOperator extractOperator()
public static ExpressionOperator trimOperator()
public static ExpressionOperator trim2Operator()
public boolean isOutputAllowWithResultSet()
isOutputAllowWithResultSet
in class DatabasePlatform
public boolean isSybase()
isSybase
in interface Platform
isSybase
in class DatasourcePlatform
public java.util.Hashtable maximumNumericValues()
NOTE: BigInteger & BigDecimal maximums are dependent upon their precision & Scale
maximumNumericValues
in class DatabasePlatform
public java.util.Hashtable minimumNumericValues()
NOTE: BigInteger & BigDecimal minimums are dependent upon their precision & Scale
minimumNumericValues
in class DatabasePlatform
public ExpressionOperator modOperator()
public void printFieldIdentityClause(java.io.Writer writer) throws ValidationException
printFieldIdentityClause
in class DatabasePlatform
ValidationException
public void printFieldNullClause(java.io.Writer writer) throws ValidationException
printFieldNullClause
in class DatabasePlatform
ValidationException
public void registerOutputParameter(java.sql.CallableStatement statement, int index, int jdbcType) throws java.sql.SQLException
registerOutputParameter
in class DatabasePlatform
java.sql.SQLException
public boolean requiresProcedureCallBrackets()
requiresProcedureCallBrackets
in class DatabasePlatform
public boolean requiresProcedureCallOuputToken()
requiresProcedureCallOuputToken
in class DatabasePlatform
public boolean requiresTypeNameToRegisterOutputParameter()
requiresTypeNameToRegisterOutputParameter
in class DatabasePlatform
public boolean shouldPrintInOutputTokenBeforeType()
DatabasePlatform
shouldPrintInOutputTokenBeforeType
in class DatabasePlatform
public boolean shouldPrintOutputTokenBeforeType()
DatabasePlatform
shouldPrintOutputTokenBeforeType
in class DatabasePlatform
public boolean shouldUseJDBCOuterJoinSyntax()
shouldUseJDBCOuterJoinSyntax
in class DatabasePlatform
public ExpressionOperator singleArgumentSubstringOperator()
public boolean supportsIdentity()
supportsIdentity
in class DatasourcePlatform
public boolean supportsDeleteOnCascade()
supportsDeleteOnCascade
in class DatabasePlatform
public boolean supportsGlobalTempTables()
supportsGlobalTempTables
in class DatabasePlatform
public DatabaseTable getTempTableForTable(DatabaseTable table)
getTempTableForTable
in class DatabasePlatform
public void writeUpdateOriginalFromTempTableSql(java.io.Writer writer, DatabaseTable table, java.util.Collection pkFields, java.util.Collection assignedFields) throws java.io.IOException
writeUpdateOriginalFromTempTableSql
in class DatabasePlatform
java.io.IOException
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference