Purpose: Provides Sybase ASE specific behavior.
Responsibilities:
| Access | Constructor and Description |
|---|---|
| public |
| typeStrings | back to summary |
|---|---|
| protected Map<Integer, String> typeStrings | |
| SybasePlatform | back to summary |
|---|---|
| public SybasePlatform() | |
| appendByteArray | back to summary |
|---|---|
| protected void appendByteArray(byte[] bytes, Writer writer) throws IOException Overrides org. If using native SQL then print a byte[] as '0xFF...'
| |
| appendCalendar | back to summary |
|---|---|
| protected void appendCalendar(Calendar calendar, Writer writer) throws IOException Overrides org. 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'}.
| |
| appendDate | back to summary |
|---|---|
| protected void appendDate(Date date, Writer writer) throws IOException Overrides org. Answer a platform correct string representation of a Date, suitable for SQL generation. Native format: 'yyyy-mm-dd
| |
| appendSybaseCalendar | back 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) | |
| appendSybaseTimestamp | back 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). | |
| appendTime | back to summary |
|---|---|
| protected void appendTime(Time time, Writer writer) throws IOException Overrides org. 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'}.
| |
| appendTimestamp | back to summary |
|---|---|
| protected void appendTimestamp(Timestamp timestamp, Writer writer) throws IOException Overrides org. 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'}.
| |
| buildFieldTypes | back to summary |
|---|---|
| protected Hashtable Overrides org. Doc from org. Return the mapping of class types to database types for the schema framework.
| |
| buildSelectQueryForIdentity | back to summary |
|---|---|
| public ValueReadQuery buildSelectQueryForIdentity() Overrides org. INTERNAL: Build the identity query for native sequencing.
| |
| extractOperator | back to summary |
|---|---|
| protected static ExpressionOperator extractOperator() INTERNAL: Derby does not support EXTRACT, but does have DATEPART. | |
| getBatchDelimiterString | back to summary |
|---|---|
| public String getBatchDelimiterString() Overrides org. Used for batch writing and sp defs.
| |
| getCreateTempTableSqlPrefix | back to summary |
|---|---|
| protected String getCreateTempTableSqlPrefix() Overrides org. INTERNAL:
| |
| getCreationInOutputProcedureToken | back to summary |
|---|---|
| public String getCreationInOutputProcedureToken() Overrides org. Doc from org. This method is used to print the required output parameter token for the specific platform. Used when stored procedures are created.
| |
| getCreationOutputProcedureToken | back to summary |
|---|---|
| public String getCreationOutputProcedureToken() Overrides org. Doc from org. This method is used to print the required output parameter token for the specific platform. Used when stored procedures are created.
| |
| getInOutputProcedureToken | back to summary |
|---|---|
| public String getInOutputProcedureToken() Overrides org. Doc from org. This method is used to print the output parameter token when stored procedures are called
| |
| getJDBCType | back to summary |
|---|---|
| public int getJDBCType(Class<?> javaType) Overrides org. Sybase and SQL Anywhere do not support BLOB/CLOB but require LONGVARBINARY/LONGVARCHAR.
| |
| getJdbcTypeName | back to summary |
|---|---|
| public String getJdbcTypeName(int jdbcType) Overrides org. INTERNAL: Returns the type name corresponding to the jdbc type
| |
| getMaxFieldNameSize | back to summary |
|---|---|
| public int getMaxFieldNameSize() Overrides org. INTERNAL: returns the maximum number of characters that can be used in a field name on this platform.
| |
| getNativeTableInfo | back to summary |
|---|---|
| public Vector 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 | back to summary |
|---|---|
| public String getOutputProcedureToken() Overrides org. Doc from org. This method is used to print the output parameter token when stored procedures are called
| |
| getProcedureArgumentString | back to summary |
|---|---|
| public String getProcedureArgumentString() Overrides org. Used for sp defs.
| |
| getProcedureCallHeader | back to summary |
|---|---|
| public String getProcedureCallHeader() Overrides org. Used for sp calls.
| |
| getProcedureCallTail | back to summary |
|---|---|
| public String getProcedureCallTail() Overrides org. Doc from org. Used for sp calls.
| |
| getSelectForUpdateString | back to summary |
|---|---|
| public String getSelectForUpdateString() Overrides org. Doc from org. Most database support a syntax. although don't actually lock the row. Some require the OF some don't like it.
| |
| getStoredProcedureParameterPrefix | back to summary |
|---|---|
| public String getStoredProcedureParameterPrefix() Overrides org.
| |
| getTempTableForTable | back to summary |
|---|---|
| public DatabaseTable getTempTableForTable(DatabaseTable table) Overrides org. INTERNAL:
| |
| getTimestampQuery | back to summary |
|---|---|
| public ValueReadQuery getTimestampQuery() Overrides org. Implements org. PUBLIC: This method returns the query to select the timestamp from the server for Sybase.
| |
| getTypeStrings | back to summary |
|---|---|
| protected Map | |
| initializeConnectionData | back to summary |
|---|---|
| public void initializeConnectionData(Connection connection) throws SQLException Overrides org. Doc from org. INTERNAL: Allow initialization from the connection.
| |
| initializePlatformOperators | back to summary |
|---|---|
| protected void initializePlatformOperators() Overrides org. Initialize any platform-specific operators
| |
| initializeTypeStrings | back to summary |
|---|---|
| protected synchronized void initializeTypeStrings() | |
| isOutputAllowWithResultSet | back to summary |
|---|---|
| public boolean isOutputAllowWithResultSet() Overrides org. INTERNAL: Return true if output parameters can be built with result sets.
| |
| isSybase | back to summary |
|---|---|
| public boolean isSybase() Overrides org. Implements org.
| |
| maximumNumericValues | back to summary |
|---|---|
| public Hashtable Overrides org. 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
| |
| minimumNumericValues | back to summary |
|---|---|
| public Hashtable Overrides org. 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
| |
| modOperator | back to summary |
|---|---|
| protected static ExpressionOperator modOperator() Override the default MOD operator. | |
| operatorOuterJoin | back to summary |
|---|---|
| protected static ExpressionOperator operatorOuterJoin() Create the outer join operator for this platform | |
| printFieldIdentityClause | back to summary |
|---|---|
| public void printFieldIdentityClause(Writer writer) throws ValidationException Overrides org. Append the receiver's field 'identity' constraint clause to a writer.
| |
| printFieldNullClause | back to summary |
|---|---|
| public void printFieldNullClause(Writer writer) throws ValidationException Overrides org. Append the receiver's field 'NULL' constraint clause to a writer.
| |
| registerOutputParameter | back to summary |
|---|---|
| public void registerOutputParameter(CallableStatement statement, int index, int jdbcType) throws SQLException Overrides org. This method is used to register output parameter on Callable Statements for Stored Procedures as each database seems to have a different method.
| |
| registerOutputParameter | back to summary |
|---|---|
| public void registerOutputParameter(CallableStatement statement, int index, int jdbcType, String typeName) throws SQLException Overrides org. Doc from org. This method is used to register output parameter on CallableStatements for Stored Procedures as each database seems to have a different method.
| |
| requiresProcedureCallBrackets | back to summary |
|---|---|
| public boolean requiresProcedureCallBrackets() Overrides org. USed for sp calls.
| |
| requiresProcedureCallOuputToken | back to summary |
|---|---|
| public boolean requiresProcedureCallOuputToken() Overrides org. Used for sp calls. Sybase must print output after output params.
| |
| requiresTypeNameToRegisterOutputParameter | back to summary |
|---|---|
| public boolean requiresTypeNameToRegisterOutputParameter() INTERNAL: Indicates whether the version of CallableStatement.registerOutputParameter method that takes type name should be used.
| |
| shouldPrintInOutputTokenBeforeType | back to summary |
|---|---|
| public boolean shouldPrintInOutputTokenBeforeType() Overrides org. Doc from org. This is required in the construction of the stored procedures with output parameters
| |
| shouldPrintLockingClauseAfterWhereClause | back to summary |
|---|---|
| public boolean 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
| |
| shouldPrintOutputTokenBeforeType | back to summary |
|---|---|
| public boolean shouldPrintOutputTokenBeforeType() Overrides org. Doc from org. This is required in the construction of the stored procedures with output parameters
| |
| shouldUseJDBCOuterJoinSyntax | back to summary |
|---|---|
| public boolean shouldUseJDBCOuterJoinSyntax() Overrides org. JDBC defines and outer join syntax, many drivers do not support this. So we normally avoid it.
| |
| singleArgumentSubstringOperator | back to summary |
|---|---|
| protected static ExpressionOperator singleArgumentSubstringOperator() Override the default SubstringSingleArg operator. | |
| supportsDeleteOnCascade | back to summary |
|---|---|
| public boolean supportsDeleteOnCascade() Overrides org. Sybase (as of Sybase ASE 15, does not support delete on cascade). Sybase ASA (SQL Anywhere does, so must use different platform).
| |
| supportsGlobalTempTables | back to summary |
|---|---|
| public boolean supportsGlobalTempTables() Overrides org. INTERNAL:
| |
| supportsIdentity | back to summary |
|---|---|
| public boolean supportsIdentity() Overrides org. INTERNAL: Indicates whether the platform supports identity. Sybase does through IDENTITY field types. This method is to be used *ONLY* by sequencing classes
| |
| sybaseAddMonthsOperator | back to summary |
|---|---|
| protected static ExpressionOperator sybaseAddMonthsOperator() INTERNAL: Function, to add months to a date. | |
| sybaseInStringOperator | back to summary |
|---|---|
| protected static ExpressionOperator sybaseInStringOperator() INTERNAL: Build instring operator | |
| sybaseLocate2Operator | back 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... | |
| sybaseLocateOperator | back to summary |
|---|---|
| protected static ExpressionOperator sybaseLocateOperator() INTERNAL: Build the Sybase equivalent to Locate | |
| sybaseToCharOperator | back to summary |
|---|---|
| protected static ExpressionOperator sybaseToCharOperator() INTERNAL: Build Sybase equivalent to TO_CHAR. | |
| sybaseToCharWithFormatOperator | back to summary |
|---|---|
| protected static ExpressionOperator sybaseToCharWithFormatOperator() INTERNAL: Build Sybase equivalent to TO_CHAR. | |
| sybaseToDateOperator | back to summary |
|---|---|
| protected static ExpressionOperator sybaseToDateOperator() INTERNAL: Build Sybase equivalent to TO_DATE. | |
| sybaseToDateToStringOperator | back to summary |
|---|---|
| protected static ExpressionOperator sybaseToDateToStringOperator() INTERNAL: Build Sybase equivalent to TO_CHAR. | |
| sybaseToNumberOperator | back to summary |
|---|---|
| protected static ExpressionOperator sybaseToNumberOperator() INTERNAL: Build Sybase equivalent to TO_NUMBER. | |
| trim2Operator | back to summary |
|---|---|
| protected static ExpressionOperator trim2Operator() INTERNAL: Build Trim operator. | |
| trimOperator | back to summary |
|---|---|
| protected static ExpressionOperator trimOperator() INTERNAL: Use RTRIM(LTRIM(?)) function for trim. | |
| useJDBCStoredProcedureSyntax | back 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. | |