Purpose: Provides DB2 specific behavior.
Responsibilities:
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | allowBindingForSelectClause()
Overrides org. |
| protected void | appendByteArray(byte[] bytes, Writer writer)
Overrides org. |
| protected void | appendCalendar(Calendar calendar, Writer writer)
Overrides org. |
| protected void | appendDate(Date date, Writer writer)
Overrides org. |
| protected void | appendDB2Calendar(Calendar calendar, Writer writer)
Write a timestamp in DB2 specific format (yyyy-mm-dd-hh.mm.ss.ffffff). |
| protected void | appendDB2Date(Date date, Writer writer)
INTERNAL: Write a timestamp in DB2 specific format (mm/dd/yyyy). |
| protected void | appendDB2Timestamp(Timestamp timestamp, Writer writer)
INTERNAL: Write a timestamp in DB2 specific format (yyyy-mm-dd-hh.mm.ss.ffffff). |
| protected void | appendTime(Time time, Writer writer)
Overrides org. |
| protected void | appendTimestamp(Timestamp timestamp, Writer writer)
Overrides org. |
| protected ExpressionOperator | |
| protected Hashtable | buildFieldTypes()
Overrides org. |
| public ValueReadQuery | buildSelectQueryForIdentity()
Overrides org. |
| public ValueReadQuery | buildSelectQueryForSequenceObject(String qualifiedSeqName, Integer size)
Overrides org. |
| protected ExpressionOperator | caseConditionOperator()
DB2 does not allow untyped parameter binding for the THEN & ELSE 'result-expressions' of CASE expressions With binding enabled, DB2 & DB2 z/OS will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. |
| protected ExpressionOperator | caseOperator()
DB2 does not allow untyped parameter binding for the THEN & ELSE 'result-expressions' of CASE expressions With binding enabled, DB2 & DB2 z/OS will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. |
| protected ExpressionOperator | coalesceOperator()
DB2 requires that at least one argument be a known type With binding enabled, DB2 will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. |
| protected ExpressionOperator | |
| protected ExpressionOperator | |
| protected ExpressionOperator | |
| protected static ExpressionOperator | |
| protected static ExpressionOperator | disableAtLeast1BindingExpression()
Create an ExpressionOperator that requires at least 1 typed argument |
| protected ExpressionOperator | |
| public boolean | dontBindUpdateAllQueryUsingTempTables()
INTERNAL: DB2 has issues with binding with temp table queries.
|
| protected String | getCreateTempTableSqlBodyForTable(DatabaseTable
is original table for which temp table is created. table)Overrides org. |
| protected String | getCreateTempTableSqlPrefix()
Overrides org. |
| protected String | getCreateTempTableSqlSuffix()
Overrides org. |
| public int | getMaxFieldNameSize()
Overrides org. |
| public int | getMaxForeignKeyNameSize()
Overrides org. |
| public int | getMaxUniqueKeyNameSize()
Overrides org. |
| public Vector | getNativeTableInfo(String table, String creator, AbstractSession session)
INTERNAL: Return the catalog information through using the native SQL catalog selects. |
| public String | getNoWaitString()
Overrides org. |
| public String | getProcedureArgument(String name, Object parameter, DatasourceCall.
Overrides org. |
| public String | getProcedureAsString()
Overrides org. |
| public String | getProcedureBeginString()
Overrides org. |
| public String | getProcedureCallHeader()
Overrides org. |
| public String | getProcedureEndString()
Overrides org. |
| public String | getSelectForUpdateString()
Overrides org. |
| public DatabaseTable | getTempTableForTable(DatabaseTable
is original table for which temp table is created. table)Overrides org. |
| public ValueReadQuery | getTimestampQuery()
Overrides org. Implements org. |
| public void | initializeConnectionData(Connection connection)
Overrides org. |
| protected void | initializePlatformOperators()
Overrides org. |
| public boolean | isAlterSequenceObjectSupported()
Overrides org. |
| public boolean | |
| public boolean | isDynamicSQLRequiredForFunctions()
Overrides org. |
| public boolean | isNullAllowedInSelectClause()
Overrides org. |
| protected ExpressionOperator | |
| protected ExpressionOperator | ltrim2Operator()
DB2 does not support untyped parameter binding for <operand2> With binding enabled, DB2 & DB2 z/OS will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. |
| protected ExpressionOperator | |
| public Hashtable | maximumNumericValues()
Overrides org. |
| protected ExpressionOperator | |
| public Hashtable | minimumNumericValues()
Overrides org. |
| protected ExpressionOperator | nullifOperator()
DB2 requires that at least one argument be a known type With binding enabled, DB2 & DB2 z/OS will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. |
| public void | printFieldIdentityClause(Writer writer)
Overrides org. |
| protected void | |
| public void | printSQLSelectStatement(DatabaseCall call, ExpressionSQLPrinter printer, SQLSelectStatement statement)
Overrides org. |
| protected ExpressionOperator | roundOperator()
DB2 requires that at least one argument be a known type With binding enabled, DB2 will throw an error: Db2 cannot determine how to implicitly cast the arguments between string and numeric data types. |
| protected ExpressionOperator | rtrim2Operator()
DB2 does not support untyped parameter binding for <operand2> With binding enabled, DB2 & DB2 z/OS will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. |
| public boolean | shouldBindPartialParameters()
Overrides org. |
| public boolean | shouldIgnoreException(SQLException exception)
Overrides org. |
| public boolean | |
| public boolean | shouldPrintOutputTokenAtStart()
Overrides org. |
| public boolean | shouldUseJDBCOuterJoinSyntax()
Overrides org. |
| public boolean | supportsGlobalTempTables()
Overrides org. |
| public boolean | supportsIdentity()
Overrides org. |
| public boolean | supportsLockingQueriesWithMultipleTables()
INTERNAL:
DB2 does not seem to allow FOR UPDATE on queries with multiple tables.
|
| public boolean | supportsOrderByParameters()
Overrides org. |
| public boolean | supportsSequenceObjects()
Overrides org. |
| protected ExpressionOperator | trim2()
DB2 does not support untyped parameter binding for <operand2> With binding enabled, DB2 & DB2 z/OS will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. |
| public void | writeParameterMarker(Writer writer, ParameterExpression parameter, AbstractRecord record, DatabaseCall call)
Overrides org. |
| DB2Platform | back to summary |
|---|---|
| public DB2Platform() | |
| allowBindingForSelectClause | back to summary |
|---|---|
| public boolean allowBindingForSelectClause() Overrides org. INTERNAL: DB2 does not allow stand alone, untyped parameter markers in select clause. | |
| appendByteArray | back to summary |
|---|---|
| protected void appendByteArray(byte[] bytes, Writer writer) throws IOException Overrides org. INTERNAL: Append a byte[] in native DB@ format BLOB(hexString) if usesNativeSQL(), otherwise use ODBC format from DatabasePLatform.
| |
| appendCalendar | back to summary |
|---|---|
| protected void appendCalendar(Calendar calendar, Writer writer) throws IOException Overrides org. INTERNAL: Append the Timestamp in native format if usesNativeSQL() is true otherwise use ODBC format from DatabasePlatform. Native format: 'YYYY-MM-DD-hh.mm.ss.SSSSSS'
| |
| appendDate | back to summary |
|---|---|
| protected void appendDate(Date date, Writer writer) throws IOException Overrides org. INTERNAL: Appends the Date in native format if usesNativeSQL() otherwise use ODBC format from DatabasePlatform. Native format: 'mm/dd/yyyy'
| |
| appendDB2Calendar | back to summary |
|---|---|
| protected void appendDB2Calendar(Calendar calendar, Writer writer) throws IOException Write a timestamp in DB2 specific format (yyyy-mm-dd-hh.mm.ss.ffffff). | |
| appendDB2Date | back to summary |
|---|---|
| protected void appendDB2Date(Date date, Writer writer) throws IOException INTERNAL: Write a timestamp in DB2 specific format (mm/dd/yyyy). | |
| appendDB2Timestamp | back to summary |
|---|---|
| protected void appendDB2Timestamp(Timestamp timestamp, Writer writer) throws IOException INTERNAL: Write a timestamp in DB2 specific format (yyyy-mm-dd-hh.mm.ss.ffffff). | |
| appendTime | back to summary |
|---|---|
| protected void appendTime(Time time, Writer writer) throws IOException Overrides org. INTERNAL: Append the Time in Native format if usesNativeSQL() otherwise use ODBC format from DAtabasePlatform. Native Format: 'hh:mm:ss'
| |
| appendTimestamp | back to summary |
|---|---|
| protected void appendTimestamp(Timestamp timestamp, Writer writer) throws IOException Overrides org. INTERNAL: Append the Timestamp in native format if usesNativeSQL() is true otherwise use ODBC format from DatabasePlatform. Native format: 'YYYY-MM-DD-hh.mm.ss.SSSSSS'
| |
| ascendingOperator | back to summary |
|---|---|
| protected ExpressionOperator ascendingOperator() Disable binding support. With binding enabled, DB2 & DB2 z/OS will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610 With binding enabled, Derby will throw an error: ERROR 42X34: There is a ? parameter in the select list. This is not allowed. | |
| 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.
| |
| buildSelectQueryForSequenceObject | back to summary |
|---|---|
| public ValueReadQuery buildSelectQueryForSequenceObject(String qualifiedSeqName, Integer size) Overrides org. INTERNAL: DB2 added SEQUENCE support as of (I believe) v8.
| |
| caseConditionOperator | back to summary |
|---|---|
| protected ExpressionOperator caseConditionOperator() DB2 does not allow untyped parameter binding for the THEN & ELSE 'result-expressions' of CASE expressions With binding enabled, DB2 & DB2 z/OS will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610Examples of places where parameter markers cannot be used:
With binding enabled, Derby will throw an error: ERROR 42X87: At least one result expression (THEN or ELSE) of the CASE expression must have a known type. | |
| caseOperator | back to summary |
|---|---|
| protected ExpressionOperator caseOperator() DB2 does not allow untyped parameter binding for the THEN & ELSE 'result-expressions' of CASE expressions With binding enabled, DB2 & DB2 z/OS will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610Examples of places where parameter markers cannot be used:
With binding enabled, Derby will throw an error: ERROR 42X87: At least one result expression (THEN or ELSE) of the CASE expression must have a known type. | |
| coalesceOperator | back to summary |
|---|---|
| protected ExpressionOperator coalesceOperator() DB2 requires that at least one argument be a known type With binding enabled, DB2 will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610 With binding enabled, DB2 z/OS will throw an error: The statement string specified as the object of a PREPARE contains a predicate or expression where parameter markers have been used as operands of the same operatorfor example: ? > ?. DB2 SQL Error: SQLCODE=-417, SQLSTATE=42609 With binding enabled, Derby will throw an error: ERROR 42610: All the arguments to the COALESCE/VALUE function cannot be parameters. The function needs at least one argument that is not a parameter. | |
| concatOperator | back to summary |
|---|---|
| protected ExpressionOperator concatOperator() INTERNAL: The concat operator is of the form .... VARCHAR ( <operand1> || <operand2> ) | |
| count | back to summary |
|---|---|
| protected ExpressionOperator count() Disable binding support. With binding enabled, DB2 will throw an error: Db2 cannot determine how to implicitly cast the arguments between string and numeric data types. DB2 SQL Error: SQLCODE=-245, SQLSTATE=428F5 With binding enabled, DB2 z/OS will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610 With binding enabled, Derby will throw an error: ERROR 42X36: The 'COUNT' operator is not allowed to take a ? parameter as an operand. | |
| descendingOperator | back to summary |
|---|---|
| protected ExpressionOperator descendingOperator() Disable binding support. With binding enabled, DB2 & DB2 z/OS will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610 With binding enabled, Derby will throw an error: ERROR 42X34: There is a ? parameter in the select list. This is not allowed. | |
| disableAllBindingExpression | back to summary |
|---|---|
| protected static ExpressionOperator disableAllBindingExpression() Create an ExpressionOperator that disables all parameter binding | |
| disableAtLeast1BindingExpression | back to summary |
|---|---|
| protected static ExpressionOperator disableAtLeast1BindingExpression() Create an ExpressionOperator that requires at least 1 typed argument | |
| distinct | back to summary |
|---|---|
| protected ExpressionOperator distinct() Disable binding support. With binding enabled, DB2 will throw an error: Db2 cannot determine how to implicitly cast the arguments between string and numeric data types. DB2 SQL Error: SQLCODE=-245, SQLSTATE=428F5 With binding enabled, DB2 & DB2 z/OS will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610 With binding enabled, Derby will throw an error: ERROR 42X34: There is a ? parameter in the select list. This is not allowed. | |
| dontBindUpdateAllQueryUsingTempTables | back to summary |
|---|---|
| public boolean dontBindUpdateAllQueryUsingTempTables() INTERNAL: DB2 has issues with binding with temp table queries. This is used by UpdateAllQuerys.
| |
| getCreateTempTableSqlBodyForTable | back to summary |
|---|---|
| protected String getCreateTempTableSqlBodyForTable(DatabaseTable table) Overrides org. INTERNAL: DB2 allows LIKE to be used to create temp tables, which avoids having to know the types. This is used by UpdateAllQuerys.
| |
| getCreateTempTableSqlPrefix | back to summary |
|---|---|
| protected String getCreateTempTableSqlPrefix() Overrides org. INTERNAL: DB2 temp table syntax. This is used by UpdateAllQuerys.
| |
| getCreateTempTableSqlSuffix | back to summary |
|---|---|
| protected String getCreateTempTableSqlSuffix() Overrides org. INTERNAL: DB2 temp table syntax. This is used by UpdateAllQuerys.
| |
| 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.
| |
| getMaxForeignKeyNameSize | back to summary |
|---|---|
| public int getMaxForeignKeyNameSize() Overrides org. INTERNAL: returns the maximum number of characters that can be used in a foreign key name on this platform.
| |
| getMaxUniqueKeyNameSize | back to summary |
|---|---|
| public int getMaxUniqueKeyNameSize() Overrides org. INTERNAL: returns the maximum number of characters that can be used in a unique key name on this platform.
| |
| getNativeTableInfo | back to summary |
|---|---|
| public Vector INTERNAL: Return the catalog information through using the native SQL catalog selects. This is required because many JDBC driver do not support meta-data. Wildcards can be passed as arguments. This is currently not used. | |
| getNoWaitString | back to summary |
|---|---|
| public String getNoWaitString() Overrides org. INTERNAL: DB2 does not support NOWAIT.
| |
| getProcedureArgument | back to summary |
|---|---|
| public String getProcedureArgument(String name, Object parameter, DatasourceCall. Overrides org. Obtain the platform specific argument string
| |
| getProcedureAsString | back to summary |
|---|---|
| public String getProcedureAsString() Overrides org. INTERNAL: Used for stored procedure defs.
| |
| getProcedureBeginString | back to summary |
|---|---|
| public String getProcedureBeginString() Overrides org. Used for stored procedure defs.
| |
| getProcedureCallHeader | back to summary |
|---|---|
| public String getProcedureCallHeader() Overrides org. INTERNAL: Used for sp calls.
| |
| getProcedureEndString | back to summary |
|---|---|
| public String getProcedureEndString() Overrides org. INTERNAL: Used for stored procedure defs.
| |
| getSelectForUpdateString | back to summary |
|---|---|
| public String getSelectForUpdateString() Overrides org. INTERNAL: Used for pessimistic locking in DB2. Without the "WITH RS" the lock is not held.
| |
| getTempTableForTable | back to summary |
|---|---|
| public DatabaseTable getTempTableForTable(DatabaseTable table) Overrides org. INTERNAL: DB2 temp table syntax. This is used by UpdateAllQuerys.
| |
| getTimestampQuery | back to summary |
|---|---|
| public ValueReadQuery getTimestampQuery() Overrides org. Implements org. INTERNAL: This method returns the query to select the timestamp from the server for DB2.
| |
| 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. INTERNAL: Initialize any platform-specific operators
| |
| isAlterSequenceObjectSupported | back to summary |
|---|---|
| public boolean isAlterSequenceObjectSupported() Overrides org. INTERNAL: DB2 added SEQUENCE support as of (I believe) v8.
| |
| isDB2 | back to summary |
|---|---|
| public boolean isDB2() Overrides org. Implements org.
| |
| isDynamicSQLRequiredForFunctions | back to summary |
|---|---|
| public boolean isDynamicSQLRequiredForFunctions() Overrides org. INTERNAL DB2 has some issues with using parameters on certain functions and relations. This allows statements to disable binding only in these cases. If users set casting on, then casting is used instead of dynamic SQL.
| |
| isNullAllowedInSelectClause | back to summary |
|---|---|
| public boolean isNullAllowedInSelectClause() Overrides org. INTERNAL: DB2 does not allow NULL in select clause. This is used by UpdateAllQuerys.
| |
| lengthOperator | back to summary |
|---|---|
| protected ExpressionOperator lengthOperator() Disable binding support. With binding enabled, DB2 will throw an error: Db2 cannot determine how to implicitly cast the arguments between string and numeric data types. DB2 SQL Error: SQLCODE=-245, SQLSTATE=428F5 With binding enabled, DB2 z/OS will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610 With binding enabled, Derby will throw an error: ERROR 42X36: The 'length' operator is not allowed to take a ? parameter as an operand. | |
| ltrim2Operator | back to summary |
|---|---|
| protected ExpressionOperator ltrim2Operator() DB2 does not support untyped parameter binding for <operand2> With binding enabled, DB2 & DB2 z/OS will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610 | |
| max | back to summary |
|---|---|
| protected ExpressionOperator max() Disable binding support. With binding enabled, DB2 will throw an error: Db2 cannot determine how to implicitly cast the arguments between string and numeric data types. DB2 SQL Error: SQLCODE=-245, SQLSTATE=428F5 With binding enabled, DB2 z/OS will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610 With binding enabled, Derby will throw an error: ERROR 42X36: The 'MAX' operator is not allowed to take a ? parameter as an operand. | |
| maximumNumericValues | back to summary |
|---|---|
| public Hashtable Overrides org. INTERNAL: 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
| |
| min | back to summary |
|---|---|
| protected ExpressionOperator min() Disable binding support. With binding enabled, DB2 will throw an error: Db2 cannot determine how to implicitly cast the arguments between string and numeric data types. DB2 SQL Error: SQLCODE=-245, SQLSTATE=428F5 With binding enabled, DB2 z/OS will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610 With binding enabled, Derby will throw an error: ERROR 42X36: The 'MIN' operator is not allowed to take a ? parameter as an operand. | |
| minimumNumericValues | back to summary |
|---|---|
| public Hashtable Overrides org. INTERNAL: 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
| |
| nullifOperator | back to summary |
|---|---|
| protected ExpressionOperator nullifOperator() DB2 requires that at least one argument be a known type With binding enabled, DB2 & DB2 z/OS will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610 With binding enabled, Derby will throw an error: ERROR 42X35: It is not allowed for both operands of '=' to be ? parameters. | |
| printFieldIdentityClause | back to summary |
|---|---|
| public void printFieldIdentityClause(Writer writer) throws ValidationException Overrides org. INTERNAL: Append the receiver's field 'identity' constraint clause to a writer. Used by table creation with sequencing.
| |
| printFieldTypeSize | back to summary |
|---|---|
| protected void printFieldTypeSize(Writer writer, FieldDefinition field, FieldTypeDefinition ftd) throws IOException Overrides org.
| |
| printSQLSelectStatement | back to summary |
|---|---|
| public void printSQLSelectStatement(DatabaseCall call, ExpressionSQLPrinter printer, SQLSelectStatement statement) Overrides org. INTERNAL: Print the SQL representation of the statement on a stream, storing the fields in the DatabaseCall. This implementation works MaxRows and FirstResult into the SQL using DB2's ROWNUMBER() OVER() to filter values if shouldUseRownumFiltering is true.
| |
| roundOperator | back to summary |
|---|---|
| protected ExpressionOperator roundOperator() DB2 requires that at least one argument be a known type With binding enabled, DB2 will throw an error: Db2 cannot determine how to implicitly cast the arguments between string and numeric data types. DB2 SQL Error: SQLCODE=-245, SQLSTATE=428F5 | |
| rtrim2Operator | back to summary |
|---|---|
| protected ExpressionOperator rtrim2Operator() DB2 does not support untyped parameter binding for <operand2> With binding enabled, DB2 & DB2 z/OS will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610 | |
| shouldBindPartialParameters | back to summary |
|---|---|
| public boolean shouldBindPartialParameters() Overrides org. Used to determine if the platform should perform partial parameter binding or not Enabled for DB2 and DB2 for zOS to add support for partial binding
| |
| shouldIgnoreException | back to summary |
|---|---|
| public boolean shouldIgnoreException(SQLException exception) Overrides org. INTERNAL: Allow for the platform to ignore exceptions. This is required for DB2 which throws no-data modified as an exception.
| |
| shouldPrintForUpdateClause | back to summary |
|---|---|
| public boolean shouldPrintForUpdateClause() Overrides org.
| |
| shouldPrintOutputTokenAtStart | back to summary |
|---|---|
| public boolean shouldPrintOutputTokenAtStart() Overrides org. INTERNAL: This is required in the construction of the stored procedures with output parameters.
| |
| shouldUseJDBCOuterJoinSyntax | back to summary |
|---|---|
| public boolean shouldUseJDBCOuterJoinSyntax() Overrides org. INTERNAL: JDBC defines and outer join syntax, many drivers do not support this. So we normally avoid it.
| |
| supportsGlobalTempTables | back to summary |
|---|---|
| public boolean supportsGlobalTempTables() Overrides org. INTERNAL: DB2 supports temp tables. This is used by UpdateAllQuerys.
| |
| supportsIdentity | back to summary |
|---|---|
| public boolean supportsIdentity() Overrides org. INTERNAL: Indicates whether the platform supports identity. DB2 does through AS IDENTITY field types. This is used by sequencing.
| |
| supportsLockingQueriesWithMultipleTables | back to summary |
|---|---|
| public boolean supportsLockingQueriesWithMultipleTables() INTERNAL: DB2 does not seem to allow FOR UPDATE on queries with multiple tables. This is only used by testing to exclude these tests.
| |
| supportsOrderByParameters | back to summary |
|---|---|
| public boolean supportsOrderByParameters() Overrides org. DB2 disables single parameter usage in ORDER BY clause. If a parameter marker is used, DB2 & DB2 z/OS will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610 If a parameter marker is used, Derby will throw an error: ERROR 42X34: There is a ? parameter in the select list. This is not allowed.
| |
| supportsSequenceObjects | back to summary |
|---|---|
| public boolean supportsSequenceObjects() Overrides org. INTERNAL: DB2 added SEQUENCE support as of (I believe) v8.
| |
| trim2 | back to summary |
|---|---|
| protected ExpressionOperator trim2() DB2 does not support untyped parameter binding for <operand2> With binding enabled, DB2 & DB2 z/OS will throw an error: The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610 | |
| writeParameterMarker | back to summary |
|---|---|
| public void writeParameterMarker(Writer writer, ParameterExpression parameter, AbstractRecord record, DatabaseCall call) throws IOException Overrides org. INTERNAL: DB2 requires casting on certain operations, such as the CONCAT function, and parameterized queries of the form, ":param = :param". This method will write CAST operation to parameters if the type is known. This is not used by default, only if isCastRequired is set to true, by default dynamic SQL is used to avoid the issue in only the required cases.
| |