Top Description Fields Constructors Methods
org.eclipse.persistence.platform.database

public Class SybasePlatform

extends DatabasePlatform
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.platform.database.SQLAnywherePlatform
Imports
java.io.IOException, .StringWriter, .Writer, java.sql.CallableStatement, .Connection, .DatabaseMetaData, .SQLException, .Types, java.util.ArrayList, .Calendar, .Collection, .HashMap, .Hashtable, .List, .Map, .Vector, java.util.regex.Pattern, org.eclipse.persistence.exceptions.ValidationException, org.eclipse.persistence.expressions.ExpressionOperator, org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition, org.eclipse.persistence.internal.expressions.RelationExpression, org.eclipse.persistence.internal.helper.ClassConstants, .DatabaseField, .DatabaseTable, .Helper, org.eclipse.persistence.internal.sessions.AbstractSession, org.eclipse.persistence.queries.ValueReadQuery

Purpose: Provides Sybase ASE specific behavior.

Responsibilities:

Since
TOPLink/Java 1.0

Field Summary

Modifier and TypeField and Description
protected Map<Integer, String>
Inherited from org.eclipse.persistence.platform.database.DatabasePlatform:
DEFAULT_VARCHAR_SIZE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
appendByteArray(byte[] bytes, Writer writer)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.appendByteArray.

If using native SQL then print a byte[] as '0xFF...'
protected void
appendCalendar(Calendar calendar, Writer writer)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.appendCalendar.

Answer a platform correct string representation of a Calendar, suitable for SQL generation.
protected void
appendDate(Date date, Writer writer)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.appendDate.

Answer a platform correct string representation of a Date, suitable for SQL generation.
protected void
appendSybaseCalendar(Calendar calendar, Writer writer)

Write a timestamp in Sybase specific format ( yyyy-mm-dd-hh.mm.ss.fff)

protected void
appendSybaseTimestamp(Timestamp timestamp, Writer writer)

Write a timestamp in Sybase specific format (yyyy-mm-dd-hh.mm.ss.fff).

protected void
appendTime(Time time, Writer writer)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.appendTime.

Answer a platform correct string representation of a Time, suitable for SQL generation.
protected void
appendTimestamp(Timestamp timestamp, Writer writer)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.appendTimestamp.

Answer a platform correct string representation of a Timestamp, suitable for SQL generation.
protected Hashtable<Class<?>, FieldTypeDefinition>
buildFieldTypes()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.buildFieldTypes.

Return the mapping of class types to database types for the schema framework.
public ValueReadQuery
protected static ExpressionOperator
extractOperator()

INTERNAL: Derby does not support EXTRACT, but does have DATEPART.

public String
protected String
public String
getCreationInOutputProcedureToken()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getCreationInOutputProcedureToken.

This method is used to print the required output parameter token for the specific platform.
public String
getCreationOutputProcedureToken()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getCreationOutputProcedureToken.

This method is used to print the required output parameter token for the specific platform.
public String
getInOutputProcedureToken()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getInOutputProcedureToken.

This method is used to print the output parameter token when stored procedures are called
public int
getJDBCType(Class<?> javaType)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getJDBCType.

Sybase and SQL Anywhere do not support BLOB/CLOB but require LONGVARBINARY/LONGVARCHAR.
public String
getJdbcTypeName(int jdbcType)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getJdbcTypeName.

INTERNAL: Returns the type name corresponding to the jdbc type
public int
getMaxFieldNameSize()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getMaxFieldNameSize.

INTERNAL: returns the maximum number of characters that can be used in a field name on this platform.
public Vector<E>
getNativeTableInfo(String table, String creator, AbstractSession session)

Return the catalog information through using the native SQL catalog selects.

public String
getOutputProcedureToken()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getOutputProcedureToken.

This method is used to print the output parameter token when stored procedures are called
public String
public String
public String
public String
public String
public DatabaseTable
getTempTableForTable(DatabaseTable
is original table for which temp table is created.
table
)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getTempTableForTable.

INTERNAL:
public ValueReadQuery
getTimestampQuery()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.getTimestampQuery.

Implements org.eclipse.persistence.internal.databaseaccess.Platform.getTimestampQuery.

PUBLIC: This method returns the query to select the timestamp from the server for Sybase.
protected Map<Integer, String>
public void
protected void
protected synchronized void
public boolean
isOutputAllowWithResultSet()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.isOutputAllowWithResultSet.

INTERNAL: Return true if output parameters can be built with result sets.
public boolean
public Hashtable<Class<? extends Number>, ? super Number>
maximumNumericValues()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.maximumNumericValues.

Builds a table of maximum numeric values keyed on java class.
public Hashtable<Class<? extends Number>, ? super Number>
minimumNumericValues()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.minimumNumericValues.

Builds a table of minimum numeric values keyed on java class.
protected static ExpressionOperator
modOperator()

Override the default MOD operator.

protected static ExpressionOperator
operatorOuterJoin()

Create the outer join operator for this platform

public void
printFieldIdentityClause(Writer writer)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.printFieldIdentityClause.

Append the receiver's field 'identity' constraint clause to a writer.
public void
printFieldNullClause(Writer writer)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.printFieldNullClause.

Append the receiver's field 'NULL' constraint clause to a writer.
public void
registerOutputParameter(CallableStatement statement, int index, int jdbcType)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.registerOutputParameter.

This method is used to register output parameter on Callable Statements for Stored Procedures as each database seems to have a different method.
public void
registerOutputParameter(CallableStatement statement, int index, int jdbcType, String typeName)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.registerOutputParameter.

This method is used to register output parameter on CallableStatements for Stored Procedures as each database seems to have a different method.
public boolean
public boolean
public boolean
requiresTypeNameToRegisterOutputParameter()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.requiresTypeNameToRegisterOutputParameter.

INTERNAL: Indicates whether the version of CallableStatement.registerOutputParameter method that takes type name should be used.
public boolean
shouldPrintInOutputTokenBeforeType()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldPrintInOutputTokenBeforeType.

This is required in the construction of the stored procedures with output parameters
public boolean
public boolean
shouldPrintOutputTokenBeforeType()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldPrintOutputTokenBeforeType.

This is required in the construction of the stored procedures with output parameters
public boolean
shouldUseJDBCOuterJoinSyntax()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldUseJDBCOuterJoinSyntax.

JDBC defines and outer join syntax, many drivers do not support this.
protected static ExpressionOperator
singleArgumentSubstringOperator()

Override the default SubstringSingleArg operator.

public boolean
supportsDeleteOnCascade()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.supportsDeleteOnCascade.

Sybase (as of Sybase ASE 15, does not support delete on cascade).
public boolean
public boolean
supportsIdentity()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.supportsIdentity.

INTERNAL: Indicates whether the platform supports identity.
protected static ExpressionOperator
sybaseAddMonthsOperator()

INTERNAL: Function, to add months to a date.

protected static ExpressionOperator
sybaseInStringOperator()

INTERNAL: Build instring operator

protected static ExpressionOperator
sybaseLocate2Operator()

INTERNAL: Build the Sybase equivalent to Locate with a start index.

protected static ExpressionOperator
sybaseLocateOperator()

INTERNAL: Build the Sybase equivalent to Locate

protected static ExpressionOperator
sybaseToCharOperator()

INTERNAL: Build Sybase equivalent to TO_CHAR.

protected static ExpressionOperator
sybaseToCharWithFormatOperator()

INTERNAL: Build Sybase equivalent to TO_CHAR.

protected static ExpressionOperator
sybaseToDateOperator()

INTERNAL: Build Sybase equivalent to TO_DATE.

protected static ExpressionOperator
sybaseToDateToStringOperator()

INTERNAL: Build Sybase equivalent to TO_CHAR.

protected static ExpressionOperator
sybaseToNumberOperator()

INTERNAL: Build Sybase equivalent to TO_NUMBER.

protected static ExpressionOperator
trim2Operator()

INTERNAL: Build Trim operator.

protected static ExpressionOperator
trimOperator()

INTERNAL: Use RTRIM(LTRIM(?)) function for trim.

public boolean
useJDBCStoredProcedureSyntax()

Return true if this platform is to use the JDBC supported syntax for executing stored procedures.

public void
writeUpdateOriginalFromTempTableSql(Writer
for writing the sql
writer
,
DatabaseTable
is original table for which temp table is created.
table
,
Collection<DatabaseField>
primary key fields for the original table.
pkFields
,
Collection<DatabaseField>
fields to be assigned a new value.
assignedFields
)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.writeUpdateOriginalFromTempTableSql.

INTERNAL:

Field Detail

typeStringsback to summary
protected Map<Integer, String> typeStrings

Constructor Detail

SybasePlatformback to summary
public SybasePlatform()

Method Detail

appendByteArrayback to summary
protected void appendByteArray(byte[] bytes, Writer writer) throws IOException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.appendByteArray.

If using native SQL then print a byte[] as '0xFF...'

Annotations
@Override
appendCalendarback to summary
protected void appendCalendar(Calendar calendar, Writer writer) throws IOException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.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'}.

Annotations
@Override
appendDateback to summary
protected void appendDate(Date date, Writer writer) throws IOException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.appendDate.

Answer a platform correct string representation of a Date, suitable for SQL generation. Native format: 'yyyy-mm-dd

Annotations
@Override
appendSybaseCalendarback to summary
protected void appendSybaseCalendar(Calendar calendar, Writer writer) throws IOException

Write a timestamp in Sybase specific format ( yyyy-mm-dd-hh.mm.ss.fff)

appendSybaseTimestampback to summary
protected void appendSybaseTimestamp(Timestamp timestamp, Writer writer) throws IOException

Write a timestamp in Sybase specific format (yyyy-mm-dd-hh.mm.ss.fff).

appendTimeback to summary
protected void appendTime(Time time, Writer writer) throws IOException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.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'}.

Annotations
@Override
appendTimestampback to summary
protected void appendTimestamp(Timestamp timestamp, Writer writer) throws IOException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.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'}.

Annotations
@Override
buildFieldTypesback to summary
protected Hashtable<Class<?>, FieldTypeDefinition> buildFieldTypes()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.buildFieldTypes.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.buildFieldTypes.

Return the mapping of class types to database types for the schema framework.

Annotations
@Override
buildSelectQueryForIdentityback to summary
public ValueReadQuery buildSelectQueryForIdentity()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.buildSelectQueryForIdentity.

INTERNAL: Build the identity query for native sequencing.

Annotations
@Override
extractOperatorback to summary
protected static ExpressionOperator extractOperator()

INTERNAL: Derby does not support EXTRACT, but does have DATEPART.

getBatchDelimiterStringback to summary
public String getBatchDelimiterString()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getBatchDelimiterString.

Used for batch writing and sp defs.

Annotations
@Override
getCreateTempTableSqlPrefixback to summary
protected String getCreateTempTableSqlPrefix()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getCreateTempTableSqlPrefix.

INTERNAL:

Annotations
@Override
getCreationInOutputProcedureTokenback to summary
public String getCreationInOutputProcedureToken()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getCreationInOutputProcedureToken.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getCreationInOutputProcedureToken.

This method is used to print the required output parameter token for the specific platform. Used when stored procedures are created.

Annotations
@Override
getCreationOutputProcedureTokenback to summary
public String getCreationOutputProcedureToken()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getCreationOutputProcedureToken.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getCreationOutputProcedureToken.

This method is used to print the required output parameter token for the specific platform. Used when stored procedures are created.

Annotations
@Override
getInOutputProcedureTokenback to summary
public String getInOutputProcedureToken()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getInOutputProcedureToken.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getInOutputProcedureToken.

This method is used to print the output parameter token when stored procedures are called

Annotations
@Override
getJDBCTypeback to summary
public int getJDBCType(Class<?> javaType)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getJDBCType.

Sybase and SQL Anywhere do not support BLOB/CLOB but require LONGVARBINARY/LONGVARCHAR.

Annotations
@Override
getJdbcTypeNameback to summary
public String getJdbcTypeName(int jdbcType)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getJdbcTypeName.

INTERNAL: Returns the type name corresponding to the jdbc type

Annotations
@Override
getMaxFieldNameSizeback to summary
public int getMaxFieldNameSize()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getMaxFieldNameSize.

INTERNAL: returns the maximum number of characters that can be used in a field name on this platform.

Annotations
@Override
getNativeTableInfoback to summary
public Vector<E> getNativeTableInfo(String table, String creator, AbstractSession session)

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.

getOutputProcedureTokenback to summary
public String getOutputProcedureToken()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getOutputProcedureToken.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getOutputProcedureToken.

This method is used to print the output parameter token when stored procedures are called

Annotations
@Override
getProcedureArgumentStringback to summary
public String getProcedureArgumentString()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getProcedureArgumentString.

Used for sp defs.

Annotations
@Override
getProcedureCallHeaderback to summary
public String getProcedureCallHeader()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getProcedureCallHeader.

Used for sp calls.

Annotations
@Override
getProcedureCallTailback to summary
public String getProcedureCallTail()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getProcedureCallTail.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getProcedureCallTail.

Used for sp calls.

Annotations
@Override
getSelectForUpdateStringback to summary
public String getSelectForUpdateString()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getSelectForUpdateString.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getSelectForUpdateString.

Most database support a syntax. although don't actually lock the row. Some require the OF some don't like it.

Annotations
@Override
getStoredProcedureParameterPrefixback to summary
public String getStoredProcedureParameterPrefix()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getStoredProcedureParameterPrefix.

Annotations
@Override
getTempTableForTableback to summary
public DatabaseTable getTempTableForTable(DatabaseTable table)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getTempTableForTable.

INTERNAL:

Parameters
table:DatabaseTable

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getTempTableForTable.

is original table for which temp table is created.

Returns:DatabaseTable

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getTempTableForTable.

temporary table

Annotations
@Override
getTimestampQueryback to summary
public ValueReadQuery getTimestampQuery()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.getTimestampQuery.

Implements org.eclipse.persistence.internal.databaseaccess.Platform.getTimestampQuery.

PUBLIC: This method returns the query to select the timestamp from the server for Sybase.

Annotations
@Override
getTypeStringsback to summary
protected Map<Integer, String> getTypeStrings()
initializeConnectionDataback to summary
public void initializeConnectionData(Connection connection) throws SQLException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.initializeConnectionData.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.initializeConnectionData.

INTERNAL: Allow initialization from the connection.

Annotations
@Override
initializePlatformOperatorsback to summary
protected void initializePlatformOperators()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.initializePlatformOperators.

Initialize any platform-specific operators

Annotations
@Override
initializeTypeStringsback to summary
protected synchronized void initializeTypeStrings()
isOutputAllowWithResultSetback to summary
public boolean isOutputAllowWithResultSet()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.isOutputAllowWithResultSet.

INTERNAL: Return true if output parameters can be built with result sets.

Annotations
@Override
isSybaseback to summary
public boolean isSybase()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.isSybase.

Implements org.eclipse.persistence.internal.databaseaccess.Platform.isSybase.

Annotations
@Override
maximumNumericValuesback to summary
public Hashtable<Class<? extends Number>, ? super Number> maximumNumericValues()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.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

Annotations
@Override
minimumNumericValuesback to summary
public Hashtable<Class<? extends Number>, ? super Number> minimumNumericValues()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.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

Annotations
@Override
modOperatorback to summary
protected static ExpressionOperator modOperator()

Override the default MOD operator.

operatorOuterJoinback to summary
protected static ExpressionOperator operatorOuterJoin()

Create the outer join operator for this platform

printFieldIdentityClauseback to summary
public void printFieldIdentityClause(Writer writer) throws ValidationException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.printFieldIdentityClause.

Append the receiver's field 'identity' constraint clause to a writer.

Annotations
@Override
printFieldNullClauseback to summary
public void printFieldNullClause(Writer writer) throws ValidationException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.printFieldNullClause.

Append the receiver's field 'NULL' constraint clause to a writer.

Annotations
@Override
registerOutputParameterback to summary
public void registerOutputParameter(CallableStatement statement, int index, int jdbcType) throws SQLException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.registerOutputParameter.

This method is used to register output parameter on Callable Statements for Stored Procedures as each database seems to have a different method.

Annotations
@Override
registerOutputParameterback to summary
public void registerOutputParameter(CallableStatement statement, int index, int jdbcType, String typeName) throws SQLException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.registerOutputParameter.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.registerOutputParameter.

This method is used to register output parameter on CallableStatements for Stored Procedures as each database seems to have a different method.

Annotations
@Override
requiresProcedureCallBracketsback to summary
public boolean requiresProcedureCallBrackets()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.requiresProcedureCallBrackets.

USed for sp calls.

Annotations
@Override
requiresProcedureCallOuputTokenback to summary
public boolean requiresProcedureCallOuputToken()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.requiresProcedureCallOuputToken.

Used for sp calls. Sybase must print output after output params.

Annotations
@Override
requiresTypeNameToRegisterOutputParameterback to summary
public boolean requiresTypeNameToRegisterOutputParameter()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.requiresTypeNameToRegisterOutputParameter.

INTERNAL: Indicates whether the version of CallableStatement.registerOutputParameter method that takes type name should be used.

Annotations
@Override
shouldPrintInOutputTokenBeforeTypeback to summary
public boolean shouldPrintInOutputTokenBeforeType()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldPrintInOutputTokenBeforeType.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldPrintInOutputTokenBeforeType.

This is required in the construction of the stored procedures with output parameters

Annotations
@Override
shouldPrintLockingClauseAfterWhereClauseback to summary
public boolean shouldPrintLockingClauseAfterWhereClause()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldPrintLockingClauseAfterWhereClause.

The sybase syntax for obtaining pessimistic lock is "SELECT ADDRESS_ID, ... FROM ADDRESS WITH (HOLDLOCK) WHERE (ADDRESS_ID = ?)" Please note that above only obtains shared lock. Apparently there is no way to obtain exclusive lock on Sybase using only a select statement

Annotations
@Override
shouldPrintOutputTokenBeforeTypeback to summary
public boolean shouldPrintOutputTokenBeforeType()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldPrintOutputTokenBeforeType.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldPrintOutputTokenBeforeType.

This is required in the construction of the stored procedures with output parameters

Annotations
@Override
shouldUseJDBCOuterJoinSyntaxback to summary
public boolean shouldUseJDBCOuterJoinSyntax()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldUseJDBCOuterJoinSyntax.

JDBC defines and outer join syntax, many drivers do not support this. So we normally avoid it.

Annotations
@Override
singleArgumentSubstringOperatorback to summary
protected static ExpressionOperator singleArgumentSubstringOperator()

Override the default SubstringSingleArg operator.

supportsDeleteOnCascadeback to summary
public boolean supportsDeleteOnCascade()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.supportsDeleteOnCascade.

Sybase (as of Sybase ASE 15, does not support delete on cascade). Sybase ASA (SQL Anywhere does, so must use different platform).

Annotations
@Override
supportsGlobalTempTablesback to summary
public boolean supportsGlobalTempTables()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.supportsGlobalTempTables.

INTERNAL:

Annotations
@Override
supportsIdentityback to summary
public boolean supportsIdentity()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.supportsIdentity.

INTERNAL: Indicates whether the platform supports identity. Sybase does through IDENTITY field types. This method is to be used *ONLY* by sequencing classes

Annotations
@Override
sybaseAddMonthsOperatorback to summary
protected static ExpressionOperator sybaseAddMonthsOperator()

INTERNAL: Function, to add months to a date.

sybaseInStringOperatorback to summary
protected static ExpressionOperator sybaseInStringOperator()

INTERNAL: Build instring operator

sybaseLocate2Operatorback to summary
protected static ExpressionOperator sybaseLocate2Operator()

INTERNAL: Build the Sybase equivalent to Locate with a start index. Sybase does not define this, so this gets a little complex...

sybaseLocateOperatorback to summary
protected static ExpressionOperator sybaseLocateOperator()

INTERNAL: Build the Sybase equivalent to Locate

sybaseToCharOperatorback to summary
protected static ExpressionOperator sybaseToCharOperator()

INTERNAL: Build Sybase equivalent to TO_CHAR.

sybaseToCharWithFormatOperatorback to summary
protected static ExpressionOperator sybaseToCharWithFormatOperator()

INTERNAL: Build Sybase equivalent to TO_CHAR.

sybaseToDateOperatorback to summary
protected static ExpressionOperator sybaseToDateOperator()

INTERNAL: Build Sybase equivalent to TO_DATE.

sybaseToDateToStringOperatorback to summary
protected static ExpressionOperator sybaseToDateToStringOperator()

INTERNAL: Build Sybase equivalent to TO_CHAR.

sybaseToNumberOperatorback to summary
protected static ExpressionOperator sybaseToNumberOperator()

INTERNAL: Build Sybase equivalent to TO_NUMBER.

trim2Operatorback to summary
protected static ExpressionOperator trim2Operator()

INTERNAL: Build Trim operator.

trimOperatorback to summary
protected static ExpressionOperator trimOperator()

INTERNAL: Use RTRIM(LTRIM(?)) function for trim.

useJDBCStoredProcedureSyntaxback to summary
public boolean useJDBCStoredProcedureSyntax()

Return true if this platform is to use the JDBC supported syntax for executing stored procedures. If the driver is known to be the DataDirec driver, and the value is not set, then set to true and return.

writeUpdateOriginalFromTempTableSqlback to summary
public void writeUpdateOriginalFromTempTableSql(Writer writer, DatabaseTable table, Collection<DatabaseField> pkFields, Collection<DatabaseField> assignedFields) throws IOException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.writeUpdateOriginalFromTempTableSql.

INTERNAL:

Parameters
writer:Writer

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.writeUpdateOriginalFromTempTableSql.

for writing the sql

table:DatabaseTable

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.writeUpdateOriginalFromTempTableSql.

is original table for which temp table is created.

pkFields:Collection<DatabaseField>

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.writeUpdateOriginalFromTempTableSql.

primary key fields for the original table.

assignedFields:Collection<DatabaseField>

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.writeUpdateOriginalFromTempTableSql.

fields to be assigned a new value.

Annotations
@Override